File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
examples/ruby/spec/interactions Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 24
24
25
25
it 'performs iframe switching operations' do
26
26
# Set firefox and launch web page
27
- #driver = Selenium::WebDriver.for :firefox
27
+ # driver = Selenium::WebDriver.for :firefox
28
28
driver . get ( 'https://www.selenium.dev/selenium/web/iframes.html' )
29
29
# --- Switch to iframe using WebElement ---
30
30
iframe = driver . find_element ( :id , 'iframe1' )
37
37
driver . switch_to . default_content
38
38
39
39
# --- Switch to iframe using name or ID ---
40
- iframe1 = driver . find_element ( :name , 'iframe1-name' ) # (This line doesn't switch, just locates)
40
+ iframe1 = driver . find_element ( :name , 'iframe1-name' ) # (This line doesn't switch, just locates)
41
41
driver . switch_to . frame ( iframe1 )
42
42
expect ( driver . page_source ) . to include ( 'We Leave From Here' )
43
43
You can’t perform that action at this time.
0 commit comments