File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
src/test/java/io/appium/java_client/pagefactory_tests Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -137,15 +137,15 @@ public class AndroidPageObjectTest {
137137@ AndroidFindBy (uiAutomator = "new UiSelector().resourceId(\" android:id/Fakecontent\" )" ),
138138@ AndroidFindBy (id = "android:id/Faketext1" ),
139139@ AndroidFindBy (uiAutomator = "new UiSelector().resourceId(\" android:id/list\" )" ), //by this locator element is found
140- @ AndroidFindBy (id = "android:id/FakeId" ),
140+ @ AndroidFindBy (id = "android:id/FakeId" )
141141})
142142private List <WebElement > findAllElementViews ;
143143
144144@ AndroidFindAll ({
145145@ AndroidFindBy (uiAutomator = "new UiSelector().resourceId(\" android:id/Fakecontent\" )" ),
146146@ AndroidFindBy (id = "android:id/Faketext1" ),
147147@ AndroidFindBy (uiAutomator = "new UiSelector().resourceId(\" android:id/list\" )" ), //by this locator element is found
148- @ AndroidFindBy (id = "android:id/FakeId" ),
148+ @ AndroidFindBy (id = "android:id/FakeId" )
149149})
150150private WebElement findAllElementView ;
151151
Original file line number Diff line number Diff line change @@ -99,17 +99,15 @@ public class iOSPageObjectTest {
9999private List <IOSElement > iosButtons ;
100100
101101@ iOSFindAll ({
102- @ iOSFindBy (uiAutomator = ".elements()[100000000]" ),
103- @ iOSFindBy (uiAutomator = ".elements()[300000000]" ),
104- @ iOSFindBy (uiAutomator = ".elements()[0]" ),//it is real locator
102+ @ iOSFindBy (xpath = "ComputeSumButton_Test" ),
103+ @ iOSFindBy (name = "ComputeSumButton" )//it is real locator
105104})
106105private WebElement findAllElement ;
107106
108107@ iOSFindAll ({
109- @ iOSFindBy (uiAutomator = ".elements()[100000000]" ),
110- @ iOSFindBy (uiAutomator = ".elements()[300000000]" ),
111- @ iOSFindBy (uiAutomator = ".elements()[0]" ),//it is real locator
112- })
108+ @ iOSFindBy (xpath = "ComputeSumButton_Test" ),
109+ @ iOSFindBy (name = "ComputeSumButton" )//it is real locator
110+ })
113111private List <WebElement > findAllElements ;
114112
115113@ Before
@@ -253,6 +251,6 @@ public void findAllElementsTest(){
253251
254252@ Test
255253public void findAllElementTest (){
256- Assert .assertNotEquals (null , findAllElement .getAttribute ( "text" ));
254+ Assert .assertNotEquals (null , findAllElement .getText ( ));
257255}
258256}
You can’t perform that action at this time.
0 commit comments