Hi all,
I’m trying to run the our script in real Android device, but after input username and password, the login button is not clickable…so I tried to just click the login button after the page is loaded…but doesn’t work
Appium version:
1.4.16
Chrome version:
51
Chromedriver version:
22
Android version:
6.0
Here’s how to set capablity:
Logging.info("Start android test :>>>> .............." + hub + platform); capability = new DesiredCapabilities(); DesiredCapabilities.android(); capability.setCapability("platformName","Android");
capability.setCapability("deviceName", "02157df2da6c3c2a"); // here need to check the adb devices to set the deviceName
capability.setCapability("app", "chrome");
//capability.setCapability("nativeWebTap", true);
capability.setCapability(CapabilityType.VERSION, "6.0");
capability.setJavascriptEnabled(true);
capability.setCapability("disable-popup-blocking", "true");
capability.setCapability("autoWebview", "true");
capability.setCapability("androidPackage", "com.android.chrome");
driver.set(new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capability));
Here’s step:
Base.base.getDriver().get("http://10.13.6.151:8080//mail"); Base.base.getDriver().findElement(By.xpath("//div[contains(@id,'loginButton')]")).click();
Logs:
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/url {"url":"http://10.13.6.151:8080/mail"}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/url] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/url] with body: {"url":"http://10.13.6.151:8080/mail"}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":null}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/url 200 115.597 ms - 72
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element {"using":"xpath","value":"//div[contains(@id,'loginButton')]"}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/element] with body: {"using":"xpath","value":"//div[contains(@id,'loginButton')]"}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":{"ELEMENT":"0.15128376602881333-2"}}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element 200 86.431 ms - 103
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element/0.15128376602881333-2/click {"id":"0.15128376602881333-2"}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element/0.15128376602881333-2/click] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/element/0.15128376602881333-2/click] with body: {"id":"0.15128376602881333-2"}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":null}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/element/0.15128376602881333-2/click 200 186.738 ms - 72
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame {"id":null}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/frame] with body: {"id":null}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":null}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame 200 17.824 ms - 72
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts {"type":"implicit","ms":80000}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts] with body: {"type":"implicit","ms":80000}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":null}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts 200 5.203 ms - 72
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame {"id":null}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/frame] with body: {"id":null}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"3c4771824bf5786b222807477f18ace0","status":0,"value":null}
info: JSONWP Proxy: Replacing sessionId 3c4771824bf5786b222807477f18ace0 with 3c4771824bf5786b222807477f18ace0
info: <-- POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/frame 200 20.705 ms - 72
info: --> POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts {"type":"implicit","ms":80000}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts] to [POST http://127.0.0.1:9515/wd/hub/session/3c4771824bf5786b222807477f18ace0/timeouts] with body: {"type":"implicit","ms":80000}