Skip to content

Commit d5b1c78

Browse files
committed
[java] Fixing a test, more information here: https://bugzilla.mozilla.org/show_bug.cgi?id=1689949#c2
1 parent 37e98d2 commit d5b1c78

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

java/client/test/org/openqa/selenium/ElementFindingTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ public void testShouldNotBeAbleToLocateASingleElementOnABlankPage() {
770770

771771
@SwitchToTopAfterTest
772772
@Test
773+
@Ignore(FIREFOX)
773774
public void testAnElementFoundInADifferentFrameIsStale() {
774775
driver.get(pages.missedJsReferencePage);
775776
driver.switchTo().frame("inner");
@@ -779,6 +780,21 @@ public void testAnElementFoundInADifferentFrameIsStale() {
779780
.isThrownBy(element::getText);
780781
}
781782

783+
@SwitchToTopAfterTest
784+
@Test
785+
@Ignore(CHROME)
786+
@Ignore(EDGE)
787+
@Ignore(IE)
788+
@Ignore(SAFARI)
789+
public void testAnElementInAFrameCannotBeAccessedFromAnotherFrame() {
790+
driver.get(pages.missedJsReferencePage);
791+
driver.switchTo().frame("inner");
792+
WebElement element = driver.findElement(By.id("oneline"));
793+
driver.switchTo().defaultContent();
794+
assertThatExceptionOfType(NoSuchElementException.class)
795+
.isThrownBy(element::getText);
796+
}
797+
782798
@SwitchToTopAfterTest
783799
@Test
784800
@NotYetImplemented(SAFARI)

0 commit comments

Comments
 (0)