File tree Expand file tree Collapse file tree
src/test/java/macaca/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 <configuration >
1616 <source >1.5</source >
1717 <target >1.5</target >
18+ <encoding >utf8</encoding >
1819 </configuration >
1920 </plugin >
2021 <plugin >
4445 <dependency >
4546 <groupId >macaca.webdriver.client</groupId >
4647 <artifactId >macacaclient</artifactId >
47- <version >2.0.20 </version >
48+ <version >2.0.24 </version >
4849 </dependency >
4950 <dependency >
5051 <groupId >com.alibaba</groupId >
Original file line number Diff line number Diff line change 33import com .alibaba .fastjson .JSONArray ;
44import com .alibaba .fastjson .JSONObject ;
55
6- import macaca .client .commands .Element ;
7- import macaca .client .common .ElementSelector ;
86import org .junit .After ;
97import org .junit .Assert ;
108import org .junit .Before ;
119import org .junit .Test ;
1210
1311import java .io .File ;
1412import java .io .IOException ;
13+ import java .util .List ;
14+ import macaca .client .commands .Element ;
1515
1616import static org .hamcrest .CoreMatchers .containsString ;
1717
@@ -68,8 +68,8 @@ public void loginTest() throws Exception {
6868 driver .elementById ("com.github.android_app_bootstrap:id/mobileNoEditText" )
6969 .sendKeys ("中文+Test+12345678" );
7070
71- ElementSelector selector = driver .elementsByClassName ("android.widget.EditText" );
72- selector . getIndex (1 ).sendKeys ("111111" );
71+ List < Element > elements = driver .elementsByClassName ("android.widget.EditText" );
72+ elements . get (1 ).sendKeys ("111111" );
7373 driver .elementByName ("Login" ).click ();
7474 driver .sleep (1000 );
7575 }
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public void testCaseThree() throws Exception {
6767 System .out .println ("test case #3" );
6868
6969 driver .get ("https://www.baidu.com" );
70- driver .elementsByXPath ("//*[@id=\" u1\" ]/a" ).getIndex (0 ).click ();
70+ driver .elementsByXPath ("//*[@id=\" u1\" ]/a" ).get (0 ).click ();
7171 driver .sleep (3000 );
7272 }
7373
You can’t perform that action at this time.
0 commit comments