there are cases where an object is located in an Iframe ( web text editors is a common case ) but a common rule is . The iframe is often used to add content from other sources like an advertisement into a web page. The iframe is defined with the <iframe> tag.
When we want to select an element in an Iframe we need to switch webdriver’s focus to that Iframe
Selenium provides
driver.switchTo().frame(WebElement)
// do all your actions here
// then switch back to the original content
driver.switchTo().defaultContent();

Leave a Reply
You must be logged in to post a comment.