Hi,
Although the problem is in webdriver , but it’s being used with Appium , so …
//click on Button
public void clickOn(String buttonName){
try {
WebElement element = driver.findElement(By.id("login_button")); //should be switched to name instead of text
element.click();
} catch (NoSuchElementException ex){
System.err.println("The element with name : couldn't be located --> " + ex.getMessage());
}
}
This is the code, the webelement is being found , and being clicked, appium logs are :
info: --> POST /wd/hub/session/0ef049ad-5ec2-4b9a-8a75-0c92e8f36913/element {"using":"id","value":"cvm_btn_login_button"}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session/1ed98687b397fe1f0100a4c3edb4f175/element","method":"POST","json":{"using":"id","value":"cvm_btn_login_button"}}
info: [debug] Proxied response received with status 200: {"sessionId":"1ed98687b397fe1f0100a4c3edb4f175","status":0,"value":{"ELEMENT":"0.6520524327643216-3"}}
info: <-- POST /wd/hub/session/0ef049ad-5ec2-4b9a-8a75-0c92e8f36913/element 200 64.849 ms - 102
info: --> POST /wd/hub/session/0ef049ad-5ec2-4b9a-8a75-0c92e8f36913/element/0.6520524327643216-3/click {"id":"0.6520524327643216-3"}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session/1ed98687b397fe1f0100a4c3edb4f175/element/0.6520524327643216-3/click","method":"POST","json":{"id":"0.6520524327643216-3"}}
info: [debug] Proxied response received with status 200: {"sessionId":"1ed98687b397fe1f0100a4c3edb4f175","status":0,"value":null}
info: <-- POST /wd/hub/session/0ef049ad-5ec2-4b9a-8a75-0c92e8f36913/element/0.6520524327643216-3/click 200 117.139 ms - 72
But still , nothing happens , it seems that the webdriver doesn’t work properly …
Any ideas how to solve it ?
thanks !