Skip to content

Commit 0c2f13d

Browse files
sbt-sidochenko-vvsbt-sidochenko-vv
authored andcommitted
Add support for linkText and partialLinkText serch locators to @SelendroidFindBy annotation
1 parent 3523698 commit 0c2f13d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/test/java/io/appium/java_client/pagefactory_tests/SelendroidModeTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public class SelendroidModeTest {
6565

6666
@SelendroidFindBy(tagName = "TextView")
6767
private WebElement textTag;
68+
69+
@SelendroidFindBy(linkText = "Accessibility")
70+
private WebElement textLink;
71+
72+
@SelendroidFindBy(linkText = "ccessibilit")
73+
private WebElement textPartialLink;
6874

6975
@Before
7076
public void setUp() throws Exception {
@@ -140,9 +146,21 @@ public void findByElementByCalssTest() {
140146
public void findByElementByTagTest() {
141147
Assert.assertNotEquals(null, textTag.getAttribute("text"));
142148
}
149+
143150
@Test
144151
public void findBySelendroidAnnotationOnlyTest() {
145152
Assert.assertNotEquals(null, textSelendroidId.getAttribute("text"));
146153
}
154+
155+
@Test
156+
public void findBySelendroidLinkTextTest() {
157+
Assert.assertEquals("Accessibility", textLink.getText());
158+
159+
}
160+
161+
@Test
162+
public void findBySelendroidPartialLinkTextTest() {
163+
Assert.assertEquals("Accessibility", textPartialLink.getText());
147164

165+
}
148166
}

0 commit comments

Comments
 (0)