diff --git a/apps/bot-instagram/src/main.ts b/apps/bot-instagram/src/main.ts index 2ad88632..42e0c0a6 100644 --- a/apps/bot-instagram/src/main.ts +++ b/apps/bot-instagram/src/main.ts @@ -23,7 +23,10 @@ import { viewStories, isSaveYourLoginInfoActive, clickSaveYourLoginInfoNoButton, - logout + logout, + goToExplore, + goToMessaging, + goToSettings } from '@botmation/instagram' (async () => { @@ -34,6 +37,15 @@ import { const pages = await browser.pages() const page = pages.length === 0 ? await browser.newPage() : pages[0] + // Instagram BotActions were developed for the UI responsiveness in desktop widths + // specifically, in mobile widths, the `viewStories` BotAction will open your story + // instead of the presentation of stories + await page.setViewport({ + width: 1000, + height: 600, + deviceScaleFactor: 1, + }); + await chain( log('Botmation running'), @@ -54,10 +66,11 @@ import { // lets log in, if we are a guest givenThat(isGuest) ( - login({username: 'account', password: 'password'}), // <- put your username and password here + login({username: 'lagmahol', password: 'jesu1t2007!'}), // <- put your username and password here files()( saveCookies('instagram'), // the Bot will skip login, on next run, by loading cookies - ) + ), + ), // in case that log in failed, lets check before we operate as a logged in user @@ -76,18 +89,32 @@ import { screenshot('logged-in'), - viewStories, + // viewStories, log('screenshot taken'), + wait(12000), + + goToExplore, + + wait(2000), + + goToMessaging, + + wait(2000), + + goToSettings, + + wait(5000), - logout, + // logout, - log('logout complete'), + // log('logout complete'), wait(15000) ), + log('Done'), )(page) diff --git a/libs/instagram/src/index.ts b/libs/instagram/src/index.ts index 081713e2..9ade0050 100644 --- a/libs/instagram/src/index.ts +++ b/libs/instagram/src/index.ts @@ -5,7 +5,4 @@ export * from './lib/actions/stories' export * from './lib/constants/modals' export * from './lib/constants/urls' - -export * from './lib/helpers/urls' - -export * from './lib/selectors' +export * from './lib/constants/selectors'