I am clicking on a button to add a google account, i can see the click is being performed as a grey color strip is displayed on the button, but i am not taken to next page. I have tried below methods searching online
driver.tap() - The test passes but i am not navigated to next page
.click() - The test passes, the button gets grey strip on it(i am assuming its click) but i am not navigated to next page
Jquery - org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 13 milliseconds
Mentioned below is the code
public class Xamarin_Test {
AppiumDriver<WebElement> driver;
DesiredCapabilities x = new DesiredCapabilities();
@BeforeTest
public void setup() throws MalformedURLException, InterruptedException{
x.setCapability("platformName", "Android");
x.setCapability("platformVersion", "6.0.1");
x.setCapability("deviceName", "ZY22286T4M");
x.setCapability("app", "C:\\androidbuild\\Eyelashr\\Eyelashr_1.7.apk");
driver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"),x);
Thread.sleep(5000);
}
public void loginGooglee() throws InterruptedException{
WebDriverWait wait = new WebDriverWait(driver, 15);
WebElement googlebutton = driver.findElement(By.xpath("//android.widget.TextView[@text='Login With Google']"));
driver.tap(1, googlebutton, 1);
WebElement element1 = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//android.widget.Button[@resource-id='identifierLink']")));
Thread.sleep(5000);
WebElement button = driver.findElement(By.xpath("//android.widget.Button[@resource-id='identifierLink']"));
driver.findElement(By.xpath("//android.widget.Button[@resource-id='identifierLink']")).click();
driver.tap(1, button, 1);
JavascriptExecutor exec = (JavascriptExecutor)driver;
exec.executeScript("document.getElementById('identifierLink').click();",button );
I have also attached the image of the button i am trying to click.