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 3
3
require 'spec_helper'
4
4
5
5
RSpec . 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
+
6
12
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
-
13
13
# Switch to iframe using WebElement
14
14
iframe = driver . find_element ( id : 'iframe1' )
15
15
driver . switch_to . frame ( iframe )
38
38
# Leave frame
39
39
driver . switch_to . default_content
40
40
expect ( driver . page_source . include? ( 'This page has iframes' ) ) . to be true
41
-
42
- # Quit the browser
43
- driver . quit
44
41
end
45
42
end
You can’t perform that action at this time.
0 commit comments