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

278
Views
Webdriver.IO[7] : SwitchToFrame with css selector is not working

I want to click web element inside the iframe and trying to switch to respective iframe before clicking to web element. browser.switchToFrame(number) - switch to iframe with number is working but unable switch to iframe with css selector.

I have tried below code.

 await $('.framed_view').waitForDisplayed({ timeout: 5000 });
 const iframe = $('.framed_view');
 await browser.switchToFrame(iframe);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Because it only accepts ID of the element. This method doesn't work the same way as usual $ calls.

See: webdriver.io/docs/api/jsonwp/#switchtoframe

Tbh, I had issues with switching to frames via this or similar wdio methods myself and never managed to get it working.

about 4 years ago · Juan Pablo Isaza Report
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!