WebElement password = driver.findElement(By.name("password"));
password.sendKeys("text123");
I also tried it the other way -
WebElement password = driver.findElement(By.tagName("secure"));
password.sendKeys("text123");
I am not seeing any exception when I try to do this, but sendKeys is not entering any value in the secure text field the way it does for text field.
Help please!
Thanks,
Mayank
--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
info: [INST] 2013-03-25 11:00:29 +0000 Default: Got new command from instruments: au.getElement('2').setValueByType('a...@gmail.com')
info: [INST] 2013-03-25 11:00:29 +0000 Debug: (null).tap()
2013-03-25 11:00:29 +0000 Debug: (null).tap()
2013-03-25 11:00:29 +0000 Debug: target.frontMostApp().keyboard().typeString("a...@gmail.com")
2013-03-25 11:00:31 +0000 Default: Command executed without response
info: [INST] 2013-03-25 11:00:31 +0000 Default: Result is not protocol compliant, wrapping
info: [INSTSERVER] Socket data received (48 bytes)
debug: Appium request initiated at /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":""}
info: Responding to client with success: {"status":0,"value":"","sessionId":"e3069673-af03-40e5-a754-af69028a5322"}
POST /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element/2/value 200 2933ms - 87
info: [INSTSERVER] Sending command to instruments: au.getElementByName('password')
info: Pushed command to appium work queue: au.getElementByName('password')
debug: Request received with params: {"using":"name","value":"password"}
info: [INST] 2013-03-25 11:00:32 +0000 Default: Got new command from instruments: au.getElementByName('password')
info: [INST] 2013-03-25 11:00:32 +0000 Default: Lookup returned [object UIASecureTextField] with the name "password" (id: 3).
info: [INSTSERVER] Socket data received (61 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":{"ELEMENT":"3"}}
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"3"},"sessionId":"e3069673-af03-40e5-a754-af69028a5322"}
POST /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element 200 1179ms - 109
debug: Appium request initiated at /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element/3/value
info: [INSTSERVER] Sending command to instruments: au.getElement('3').setValueByType('test123')
info: Pushed command to appium work queue: au.getElement('3').setValueByType('test123')
debug: Request received with params: {"id":"3","value":["test123"]}
info: [INST] 2013-03-25 11:00:33 +0000 Default: Got new command from instruments: au.getElement('3').setValueByType('test123')
info: [INST] 2013-03-25 11:00:33 +0000 Debug: (null).tap()
2013-03-25 11:00:33 +0000 Default: Command executed without response
info: [INST] 2013-03-25 11:00:33 +0000 Default: Result is not protocol compliant, wrapping
info: [INSTSERVER] Socket data received (48 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":""}
info: Responding to client with success: {"status":0,"value":"","sessionId":"e3069673-af03-40e5-a754-af69028a5322"}
POST /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element/3/value 200 1058ms - 87
debug: Appium request initiated at /wd/hub/session/e3069673-af03-40e5-a754-af69028a5322/element
info: [INSTSERVER] Sending command to instruments: au.getElementByName('Login')
info: Pushed command to appium work queue: au.getElementByName('Login')
debug: Request received with params: {"using":"name","value":"Login"}
info: [INST] 2013-03-25 11:00:34 +0000 Default: Got new command from instruments: au.getElementByName('Login')
info: [INST] 2013-03-25 11:00:34 +0000 Default: Lookup returned [object UIANavigationBar] with the name "Login" (id: 4).
info: [INSTSERVER] Socket data received (61 bytes)
WebElement pwd = (new WebDriverWait(driver, 30)).until(ExpectedConditions.presenceOfElementLocated(By.name("Password")));
pwd.click();
List<WebElement> pwdList = driver.findElements(By.tagName("secure"));
pwdList.get(0).sendKeys("test");
pwdList.get(1).sendKeys("test");
But before I tried this, I was trying to fix it in appium code as mentioned by Tomasz ...
But I got
info: [INST] 2014-03-04 09:50:15 +0000 Error: Script threw an uncaught JavaScript error: Error getting next command, shutting down :-( on line 71 of bootstrap.js
When I tried to run from latest git cloned code. [using iOS 7, Mac 10.8.8 and Xcode 5.2]
What could be the issue .. ?