wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.widget.EditText[1]"")));
driver.findElement(By.xpath("//android.widget.EditText[1]")).sendKeys("1");
driver.findElement(By.xpath("//android.widget.EditText[2]")).sendKeys("2");
driver.findElement(By.xpath("//android.widget.EditText[3]")).sendKeys("3");
driver.findElement(By.xpath("//android.widget.EditText[4]")).sendKeys("4");
content-desc:
type: android.widget.EditText
text: Enter password.. Editing.
index: 1
enabled: true
visible: true
location: {75, 561}
size: {233, 117}
checkable: false
checked: false
focusable: true
long-clickable: true
password: false
resource-id:
scrollable: false
selected: false
xpath: //android.widget.EditText[1]
content-desc:
type: android.widget.EditText
text: Enter password.. Double tap to edit.
index: 2
enabled: true
visible: true
location: {308, 561}
size: {233, 117}
checkable: false
checked: false
focusable: true
long-clickable: true
password: false
resource-id:
scrollable: false
selected: false
xpath: //android.widget.EditText[2]
content-desc:
type: android.widget.EditText
text: Enter password.. Double tap to edit.
index: 3
enabled: true
visible: true
location: {541, 561}
size: {232, 117}
checkable: false
checked: false
focusable: true
long-clickable: true
password: false
resource-id:
scrollable: false
selected: false
xpath: //android.widget.EditText[3]
content-desc:
type: android.widget.EditText
text: Enter password.. Double tap to edit.
index: 4
enabled: true
visible: true
location: {773, 561}
size: {232, 117}
checkable: false
checked: false
focusable: true
long-clickable: true
password: false
resource-id:
scrollable: false
selected: false
xpath: //android.widget.EditText[4]
Appium server logs:
2014-08-06T21:28:05.611Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element
2014-08-06T21:28:05.611Z - debug: Request received with params: {"using":"xpath","value":"//android.widget.EditText[1]"}
2014-08-06T21:28:05.612Z - debug: Pushing command to appium work queue: ["dumpWindowHierarchy"]
2014-08-06T21:28:05.614Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"dumpWindowHierarchy","params":{}}
2014-08-06T21:28:05.614Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:05.614Z - debug: [BOOTSTRAP] [debug] Got command action: dumpWindowHierarchy
2014-08-06T21:28:05.772Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:05.773Z - debug: transferPageSourceXML command: "/Users/csathe/Desktop/Android/sdk/platform-tools/adb" -s 52759869 pull /data/local/tmp/local/tmp/dump.xml "/var/folders/lw/tpl5fn493k39b0kh7npsjlcw0000gn/T/11476-1601-1x6tmwj.xml"
2014-08-06T21:28:05.817Z - debug: Pushing command to appium work queue: ["find",{"strategy":"index paths","selector":"/0/1","multiple":false}]
2014-08-06T21:28:05.820Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"index paths","selector":"/0/1","multiple":false}}
2014-08-06T21:28:05.820Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:05.820Z - debug: [BOOTSTRAP] [debug] Got command action: find
2014-08-06T21:28:05.821Z - debug: [BOOTSTRAP] [debug] Finding /0/1 using INDEX_PATHS with the contextId: null multiple: false
2014-08-06T21:28:06.378Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"20"},"status":0}
2014-08-06T21:28:06.379Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element 200 769.261 ms - 88 {"status":0,"value":{"ELEMENT":"20"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:06.378Z - debug: Responding to client with success: {"status":0,"value":{"ELEMENT":"20"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:06.389Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/20/value {"id":"20","value":["1"]}
2014-08-06T21:28:06.389Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/20/value
2014-08-06T21:28:06.389Z - debug: Request received with params: {"id":"20","value":["1"]}
2014-08-06T21:28:06.389Z - debug: Pushing command to appium work queue: ["element:setText",{"elementId":"20","text":"1"}]
2014-08-06T21:28:06.392Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"20","text":"1"}}
2014-08-06T21:28:06.393Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:06.393Z - debug: [BOOTSTRAP] [debug] Got command action: setText
2014-08-06T21:28:06.393Z - debug: [BOOTSTRAP] [debug] Sending plain text to element: 1
2014-08-06T21:28:09.718Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:09.719Z - debug: Responding to client with success: {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:09.721Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/20/value 200 3333.041 ms - 76 {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:09.727Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element
2014-08-06T21:28:09.728Z - debug: Request received with params: {"using":"xpath","value":"//android.widget.EditText[2]"}
2014-08-06T21:28:09.728Z - debug: Pushing command to appium work queue: ["dumpWindowHierarchy"]
2014-08-06T21:28:09.731Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"dumpWindowHierarchy","params":{}}
2014-08-06T21:28:09.732Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:09.732Z - debug: [BOOTSTRAP] [debug] Got command action: dumpWindowHierarchy
2014-08-06T21:28:09.727Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element {"using":"xpath","value":"//android.widget.EditText[2]"}
2014-08-06T21:28:09.758Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:09.758Z - debug: transferPageSourceXML command: "/Users/csathe/Desktop/Android/sdk/platform-tools/adb" -s 52759869 pull /data/local/tmp/local/tmp/dump.xml "/var/folders/lw/tpl5fn493k39b0kh7npsjlcw0000gn/T/11476-1601-vm7ckr.xml"
2014-08-06T21:28:09.788Z - debug: Pushing command to appium work queue: ["find",{"strategy":"index paths","selector":"/0/2","multiple":false}]
2014-08-06T21:28:09.792Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"index paths","selector":"/0/2","multiple":false}}
2014-08-06T21:28:09.792Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:09.792Z - debug: [BOOTSTRAP] [debug] Got command action: find
2014-08-06T21:28:09.793Z - debug: [BOOTSTRAP] [debug] Finding /0/2 using INDEX_PATHS with the contextId: null multiple: false
2014-08-06T21:28:10.107Z - info: --> GET /wd/hub/status {}
2014-08-06T21:28:10.108Z - debug: Appium request initiated at /wd/hub/status
2014-08-06T21:28:10.111Z - info: <-- GET /wd/hub/status 200 3.716 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:10.108Z - debug: Request received with params: {}
2014-08-06T21:28:10.109Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:10.243Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"21"},"status":0}
2014-08-06T21:28:10.245Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element 200 517.680 ms - 88 {"status":0,"value":{"ELEMENT":"21"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:10.244Z - debug: Responding to client with success: {"status":0,"value":{"ELEMENT":"21"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:10.250Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/21/value {"id":"21","value":["2"]}
2014-08-06T21:28:10.250Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/21/value
2014-08-06T21:28:10.251Z - debug: Request received with params: {"id":"21","value":["2"]}
2014-08-06T21:28:10.251Z - debug: Pushing command to appium work queue: ["element:setText",{"elementId":"21","text":"2"}]
2014-08-06T21:28:10.255Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"21","text":"2"}}
2014-08-06T21:28:10.255Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:10.255Z - debug: [BOOTSTRAP] [debug] Got command action: setText
2014-08-06T21:28:10.255Z - debug: [BOOTSTRAP] [debug] Sending plain text to element: 2
2014-08-06T21:28:12.817Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:12.819Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/21/value 200 2569.751 ms - 76 {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:12.818Z - debug: Responding to client with success: {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:12.825Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element {"using":"xpath","value":"//android.widget.EditText[3]"}
2014-08-06T21:28:12.826Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element
2014-08-06T21:28:12.826Z - debug: Request received with params: {"using":"xpath","value":"//android.widget.EditText[3]"}
2014-08-06T21:28:12.826Z - debug: Pushing command to appium work queue: ["dumpWindowHierarchy"]
2014-08-06T21:28:12.830Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"dumpWindowHierarchy","params":{}}
2014-08-06T21:28:12.830Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:12.830Z - debug: [BOOTSTRAP] [debug] Got command action: dumpWindowHierarchy
2014-08-06T21:28:12.856Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:12.856Z - debug: transferPageSourceXML command: "/Users/csathe/Desktop/Android/sdk/platform-tools/adb" -s 52759869 pull /data/local/tmp/local/tmp/dump.xml "/var/folders/lw/tpl5fn493k39b0kh7npsjlcw0000gn/T/11476-1601-ccy6wz.xml"
2014-08-06T21:28:12.884Z - debug: Pushing command to appium work queue: ["find",{"strategy":"index paths","selector":"/0/3","multiple":false}]
2014-08-06T21:28:12.887Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"index paths","selector":"/0/3","multiple":false}}
2014-08-06T21:28:12.888Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:12.888Z - debug: [BOOTSTRAP] [debug] Got command action: find
2014-08-06T21:28:12.888Z - debug: [BOOTSTRAP] [debug] Finding /0/3 using INDEX_PATHS with the contextId: null multiple: false
2014-08-06T21:28:13.295Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"22"},"status":0}
2014-08-06T21:28:13.296Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element 200 470.787 ms - 88 {"status":0,"value":{"ELEMENT":"22"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:13.295Z - debug: Responding to client with success: {"status":0,"value":{"ELEMENT":"22"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:13.302Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/22/value {"id":"22","value":["3"]}
2014-08-06T21:28:13.302Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/22/value
2014-08-06T21:28:13.303Z - debug: Request received with params: {"id":"22","value":["3"]}
2014-08-06T21:28:13.303Z - debug: Pushing command to appium work queue: ["element:setText",{"elementId":"22","text":"3"}]
2014-08-06T21:28:13.307Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"22","text":"3"}}
2014-08-06T21:28:13.307Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:13.307Z - debug: [BOOTSTRAP] [debug] Got command action: setText
2014-08-06T21:28:13.307Z - debug: [BOOTSTRAP] [debug] Sending plain text to element: 3
2014-08-06T21:28:13.424Z - info: --> GET /wd/hub/status {}
2014-08-06T21:28:13.424Z - debug: Appium request initiated at /wd/hub/status
2014-08-06T21:28:13.424Z - info: <-- GET /wd/hub/status 200 0.856 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:13.424Z - debug: Request received with params: {}
2014-08-06T21:28:13.424Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:14.011Z - info: --> GET /wd/hub/status {}
2014-08-06T21:28:14.011Z - debug: Appium request initiated at /wd/hub/status
2014-08-06T21:28:14.013Z - info: <-- GET /wd/hub/status 200 2.049 ms - 155 {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:14.011Z - debug: Request received with params: {}
2014-08-06T21:28:14.011Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:16.432Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:16.432Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/22/value 200 3130.408 ms - 76 {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:16.432Z - debug: Responding to client with success: {"status":0,"value":true,"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:16.436Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element {"using":"xpath","value":"//android.widget.EditText[4]"}
2014-08-06T21:28:16.437Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element
2014-08-06T21:28:16.437Z - debug: Request received with params: {"using":"xpath","value":"//android.widget.EditText[4]"}
2014-08-06T21:28:16.437Z - debug: Pushing command to appium work queue: ["dumpWindowHierarchy"]
2014-08-06T21:28:16.441Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"dumpWindowHierarchy","params":{}}
2014-08-06T21:28:16.441Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:16.441Z - debug: [BOOTSTRAP] [debug] Got command action: dumpWindowHierarchy
2014-08-06T21:28:16.457Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
2014-08-06T21:28:16.457Z - debug: transferPageSourceXML command: "/Users/csathe/Desktop/Android/sdk/platform-tools/adb" -s 52759869 pull /data/local/tmp/local/tmp/dump.xml "/var/folders/lw/tpl5fn493k39b0kh7npsjlcw0000gn/T/11476-1601-1jt96hy.xml"
2014-08-06T21:28:16.485Z - debug: Pushing command to appium work queue: ["find",{"strategy":"index paths","selector":"/0/4","multiple":false}]
2014-08-06T21:28:16.489Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"index paths","selector":"/0/4","multiple":false}}
2014-08-06T21:28:16.489Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:16.489Z - debug: [BOOTSTRAP] [debug] Got command action: find
2014-08-06T21:28:16.489Z - debug: [BOOTSTRAP] [debug] Finding /0/4 using INDEX_PATHS with the contextId: null multiple: false
2014-08-06T21:28:16.926Z - debug: [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"23"},"status":0}
2014-08-06T21:28:16.928Z - info: <-- POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element 200 491.331 ms - 88 {"status":0,"value":{"ELEMENT":"23"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:16.927Z - debug: Responding to client with success: {"status":0,"value":{"ELEMENT":"23"},"sessionId":"efd86f01-bc46-42a3-90ef-3911b0cc42f9"}
2014-08-06T21:28:16.934Z - info: --> POST /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/23/value {"id":"23","value":["4"]}
2014-08-06T21:28:16.934Z - debug: Appium request initiated at /wd/hub/session/efd86f01-bc46-42a3-90ef-3911b0cc42f9/element/23/value
2014-08-06T21:28:16.934Z - debug: Request received with params: {"id":"23","value":["4"]}
2014-08-06T21:28:16.935Z - debug: Pushing command to appium work queue: ["element:setText",{"elementId":"23","text":"4"}]
2014-08-06T21:28:16.938Z - debug: [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"23","text":"4"}}
2014-08-06T21:28:16.938Z - debug: [BOOTSTRAP] [debug] Got command of type ACTION
2014-08-06T21:28:16.938Z - debug: [BOOTSTRAP] [debug] Got command action: setText
2014-08-06T21:28:16.938Z - debug: [BOOTSTRAP] [debug] Sending plain text to element: 4
2014-08-06T21:28:18.974Z - info: --> GET /wd/hub/status {}
WebElement element;
List<String> inputs = new arrayList<String>();
inputs.add("1");
inputs.add("2");
inputs.add("3");
inputs.add("4");
for (int index=0; index<editText.size(); index++) {
element.sendKeys(inputs.get(index));
elementList.get(0).sendKeys("1");
elementList.get(1).sendKeys("2");
elementList.get(2).sendKeys("3");
elementList.get(3).sendKeys("4");
<p style="margin-bottom: 0px; font-size: 12px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); back...
...
...