How do I get frames for Selenium-Webdriver?
There are currently two frames on one page (window).If you specify a condition in one frame (Frame A) and click the extract button, the result will be reflected in the other frame (Frame B).After specifying conditions in frame A, we would like to operate frame B in ruby language in Selenium-Webdriver.Obtain Frame A using the program below and
frame=driver.find_element(:id, "Frame A")
driver.switch_to.frame(frame)
I tried to get frame B by returning it to the top frame in the program below, but I couldn't get it no matter how many times I tried.
driver.switch_to.window(driver.window_handle)
frame=driver.find_element(:name, "Frame B")
driver.switch_to.frame(frame)
On the other hand, I was able to get frame B in the same way.However, if you go back to the top frame and try to get frame A, you get an error.
How can I get it?
By the way, the operating system is Ubunto 16.04 and the browser uses Firefox.
Switch_to.default_content reverts to the top frame
driver.switch_to.default_content
776 M2 Mac fails to install rbenv install 3.1.3 due to errors
856 Uncaught (inpromise) Error on Electron: An object could not be cloned
771 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1235 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2025 OneMinuteCode. All rights reserved.