Hi,
I am trying to click on a button inside web view.
My test code is:
public void testButtonClick() throws Exception{
WebView webView = (WebView) solo.getView(R.id.webView1);
solo.waitForView(webView, 2000, false);
By installButton=By.xpath("//button[@class=\"price buy id-track-click id-track-impression\"]");
solo.waitForWebElement(installButton, 60000, false);
solo.clickOnWebElement(installButton, 0, false);
}
I have to click on the install button automatically. When i run this code i am getting webelement with xpath not found. please help me with this issue.
Hi, I am trying to click on a button inside web view. My test code is: public void testButtonClick() throws Exception{ WebView webView = (WebView) solo.getView(R.id.webView1); solo.waitForView(webView, 2000, false); By installButton=By.xpath("//button[@class=\"price buy id-track-click id-track-impression\"]");
solo.waitForWebElement(installButton, 60000, false);
solo.clickOnWebElement(installButton, 0, false);
}
I am loading the webpage with url: https://play.google.com/store/apps/details?id=com.whatsapp&hl=en
I have to click on the install button automatically. When i run this code i am getting webelement with xpath not found. please help me with this issue.
Thanks in advance!!