Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Can't interact with web elements in second browser tab in Webdriver.io

I just found this issue and didn't find any topic or solution related to this problem anywhere. When a second browser tab is opened (the new tab is automatically focused) I can not interact with any web elements because Webdriver.io is searching for the respective element in the DOM tree of the first browser tab. I thought if I change focus with browser.switchWindow() to the first tab and then focus on the second again will fix the issue but didn't. I couldn't find a workaround or solution for this problem.

The code below represents my approach.

Given(/^Test given$/, async () => {
    await browser.url("https://www.google.com/?client=safari");
    await browser.newWindow("https://www.facebook.com");
    await $("facebook element selector").click();
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!