Hi Team,
I would like to click on element using JavascriptExecutor.
I am able to click on element with command:
driver.findElement(By.xpath("//android.widget.Button[@text=‘Play’]")).click();
This command execution takes time in between 10-25 seconds. This is slowing down test case execution process.
I would like to click do this operation using JavascriptExecutor.
Here is code for reading text using JavaScriptExecutor and exception
0
down vote
favorite
I am trying to perform read text from Android - Chrome Browser using JavascriptExecutor.
My code: String videoDurationValue = javascriptExecutor.executeScript( “var value = “document.evaluate(”//*[@id=‘my-video’]/div[5]/div[7]/div”, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML; return value.stringValue;").toString();
But getting error - org.openqa.selenium.WebDriverException: Method is not implemented
Appium version 1.8.1
How can I do the same? Please do let me know.
Thanks,
Deepak
DiverSity Tech