@@ -242,15 +242,14 @@ def testShouldBeAbleToSwitchToParentFromAnIframe(self):
242
242
#
243
243
# ----------------------------------------------------------------------------------------------
244
244
245
- @pytest .mark .ignore_marionette
246
245
@pytest .mark .ignore_phantomjs
247
246
@pytest .mark .ignore_firefox
248
247
def testShouldContinueToReferToTheSameFrameOnceItHasBeenSelected (self ):
249
248
self ._load_page ("frameset" )
250
249
self .driver .switch_to .frame (2 )
251
250
checkbox = self .driver .find_element (By .XPATH , "//input[@name='checky']" )
252
251
checkbox .click ()
253
- # checkbox.submit()
252
+ checkbox .submit ()
254
253
255
254
# TODO(simon): this should not be needed, and is only here because IE's submit returns too
256
255
# soon.
@@ -290,20 +289,19 @@ def testShouldAllowTheUserToSwitchToAnIFrameAndRemainFocusedOnIt(self):
290
289
def getTextOfGreetingElement (self ):
291
290
return WebDriverWait (self .driver , 3 ).until (EC .presence_of_element_located ((By .ID , "greeting" ))).text
292
291
293
- @pytest .mark .ignore_marionette
294
292
@pytest .mark .ignore_phantomjs
295
293
@pytest .mark .ignore_firefox
296
294
def testShouldBeAbleToClickInAFrame (self ):
297
295
self ._load_page ("frameset" )
298
- self .driver .switch_to .frame (self . driver . find_element_by_name ( "third" ) )
296
+ self .driver .switch_to .frame ("third" )
299
297
300
298
# This should replace frame "third" ...
301
299
self .driver .find_element (By .ID , "submitButton" ).click ()
302
300
# driver should still be focused on frame "third" ...
303
301
self .assertEqual (self .getTextOfGreetingElement (), "Success!" )
304
302
# Make sure it was really frame "third" which was replaced ...
305
- WebDriverWait ( self .driver , 3 ). until ( EC . presence_of_element_located (( By . ID , "third" )) )
306
- self .driver .switch_to .frame ()
303
+ self .driver . switch_to . default_content ( )
304
+ self .driver .switch_to .frame ("third" )
307
305
self .assertEqual (self .getTextOfGreetingElement (), "Success!" )
308
306
309
307
def testShouldBeAbleToClickInAFrameThatRewritesTopWindowLocation (self ):
0 commit comments