Which method is used to switch to a frame on a webpage using Ruby Selenium Webdriver?

0 votes
Which method is used to switch to a frame on a webpage using Ruby Selenium Webdriver?
Aug 26 in Selenium by Hemant
41 views

1 answer to this question.

0 votes

Hi Hemant, you can use driver.switch_to.frame method to switch to a frame on a webpage using ruby selenium webdriver. This method takes frame's id or name or any other identifier and switch the focus from window to frame. Checkout following commands to understand better:

driver.switch_to.frame "#frameId" # id of frame
driver.switch_to.frame driver.find_element(id: '#frameId') # frame element
driver.switch_to.default_content  # default_content to switch back to default window
answered Aug 26 by Abha
• 27,180 points

Related Questions In Selenium

+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
1,142 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,150 points
1,242 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,150 points
993 views
0 votes
1 answer