Skip to content

Commit b55cf53

Browse files
committed
visually validate a frame within the page
1 parent c1e345a commit b55cf53

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

resources/test.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
site.bookstore.url=file:///Users/angie/workspace/test_automation_u/visual_validation_course/website/index.html
55
site.largedom.url=https://the-internet.herokuapp.com/large
66
site.dynamic.url=https://the-internet.herokuapp.com/dynamic_content
7+
site.frames.url=https://the-internet.herokuapp.com/nested_frames
78

89
################
910
# SELENIUM #

src/test/java/TheInternetTests.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import base.BaseTests;
2+
import org.junit.Test;
3+
4+
public class TheInternetTests extends BaseTests {
5+
6+
@Test
7+
public void testBottomFrame(){
8+
driver.get(System.getProperty("site.frames.url"));
9+
validateFrame("frame-bottom");
10+
}
11+
}

src/test/java/base/BaseTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,10 @@ public void validateElement(By locator){
5555
eyes.close();
5656
}
5757

58+
public void validateFrame(String locator){
59+
eyes.open(driver, "The Internet", Thread.currentThread().getStackTrace()[2].getMethodName());
60+
eyes.checkFrame(locator);
61+
eyes.close();
62+
}
63+
5864
}

0 commit comments

Comments
 (0)