Skip to content

Commit 98f12eb

Browse files
[PY] Fix and reenable Frame switching tests
1 parent 26e3e20 commit 98f12eb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

py/test/selenium/webdriver/common/frame_switching_tests.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,14 @@ def testShouldBeAbleToSwitchToParentFromAnIframe(self):
242242
#
243243
# ----------------------------------------------------------------------------------------------
244244

245-
@pytest.mark.ignore_marionette
246245
@pytest.mark.ignore_phantomjs
247246
@pytest.mark.ignore_firefox
248247
def testShouldContinueToReferToTheSameFrameOnceItHasBeenSelected(self):
249248
self._load_page("frameset")
250249
self.driver.switch_to.frame(2)
251250
checkbox = self.driver.find_element(By.XPATH, "//input[@name='checky']")
252251
checkbox.click()
253-
# checkbox.submit()
252+
checkbox.submit()
254253

255254
# TODO(simon): this should not be needed, and is only here because IE's submit returns too
256255
# soon.
@@ -290,20 +289,19 @@ def testShouldAllowTheUserToSwitchToAnIFrameAndRemainFocusedOnIt(self):
290289
def getTextOfGreetingElement(self):
291290
return WebDriverWait(self.driver, 3).until(EC.presence_of_element_located((By.ID, "greeting"))).text
292291

293-
@pytest.mark.ignore_marionette
294292
@pytest.mark.ignore_phantomjs
295293
@pytest.mark.ignore_firefox
296294
def testShouldBeAbleToClickInAFrame(self):
297295
self._load_page("frameset")
298-
self.driver.switch_to.frame(self.driver.find_element_by_name("third"))
296+
self.driver.switch_to.frame("third")
299297

300298
# This should replace frame "third" ...
301299
self.driver.find_element(By.ID, "submitButton").click()
302300
# driver should still be focused on frame "third" ...
303301
self.assertEqual(self.getTextOfGreetingElement(), "Success!")
304302
# 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")
307305
self.assertEqual(self.getTextOfGreetingElement(), "Success!")
308306

309307
def testShouldBeAbleToClickInAFrameThatRewritesTopWindowLocation(self):

0 commit comments

Comments
 (0)