File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed 
examples/ruby/spec/interactions Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 33require  'spec_helper' 
44
55RSpec . describe  'Frames Test'  do 
6+   let ( :driver )  {  start_session  } 
7+ 
8+   before  do 
9+     driver . navigate . to  'https://www.selenium.dev/selenium/web/iframes.html' 
10+   end 
11+ 
612  it  'interacts with elements inside iframes'  do 
7-     driver  =  Selenium ::WebDriver . for  :chrome 
8-     driver . manage . timeouts . implicit_wait  =  0.5 
9-     
10-     # Navigate to URL 
11-     driver . get ( 'https://www.selenium.dev/selenium/web/iframes.html' ) 
12-     
1313    # Switch to iframe using WebElement 
1414    iframe  =  driver . find_element ( id : 'iframe1' ) 
1515    driver . switch_to . frame ( iframe ) 
3838    # Leave frame 
3939    driver . switch_to . default_content 
4040    expect ( driver . page_source . include? ( 'This page has iframes' ) ) . to  be  true 
41-     
42-     # Quit the browser 
43-     driver . quit 
4441  end 
4542end 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments