0

Using webdriver.io and chrome for e2e test. In the browser GUI the test runs fine. But with headless chrome it complains about not finding buttons in the left side nav bar. I think in headless the width is making it to where the drawer closes and that is why the buttons are not available. But there is no way to know for sure since it is headless.

Anyone know any work around for the issue?

1
1

I think you need to specify the screen width. Set the screen width by using the function

browser.setWindowSize(width, height)

Reference: webdriver.io/docs/api/browser/setWindowSize.html

2

But there is no way to know for sure since it is headless

Take screenshots

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.