mardi 3 septembre 2019

Protractor test cases not running in headless mode

Protractor test cases are running fine with browser open but not in headless mode.

I have tried running protractor test cases different selectors and sleep browser approaches but it doesn't work in headless mode in any way. I am running it with docker setup.

it('should show profile link', async function() {

await action.waitForSelector(map.homePage.my_profile, config.credentials.min_timeout);

await action.checkElementPresent(map.homePage.my_profile, 'profile link'); });

Error: should show profile link

   Failed: Did not find element: .my-profile

   Wait timed out after 2000ms

   Wait timed out after 2000ms

It gives the above error on asserting the selector and it works fine if tests are run with browser open. It is not able to find selector in headless mode.

Aucun commentaire:

Enregistrer un commentaire