Mobile QA Zone

A Mobile Application Testing Community

 How to handle frame in WebDriver?

Views: 16

Reply to This

Replies to This Discussion

In software testing services before working on frames first we need to understand what is a frame. Frame is a part of web page which is embedded in another web page or an HTML document embedded inside another HTML document.


Below are the ways to switch over the elements in iframes using Web Driver commands:
By Index:

  • driver.switchTo().frame(0);
  • driver.switchTo().frame(1);

By Name or Id:

  • driver.switchTo().frame("iframe1");
  • driver.switchTo().frame("id of the element");

By Web Element:

  • driver.switchTo().frame(WebElement);

RSS

© 2019   Created by Anurag Khode.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.