I have a scenario to be test on Mobile website having below steps:
- Open Gmail
- Enter your Email
- Click Next button
- Enter your password
- Click Sign In
Below is the code which is working fine with Appium + Java:
driver.findElement(By.id(“com.android.chrome:id/url_bar”)).sendKeys(“https://www.gmail.com”);
driver.sendKeyEvent(AndroidKeyCode.ENTER);
driver.findElement(By.name(“Enter your email”)).sendKeys("[email protected]");
driver.hideKeyboard();
driver.findElement(By.name(“Next”)).click();
driver.findElement(By.className(“android.widget.EditText”)).sendKeys(“test@123”);
driver.findElement(By.name(“Sign in”)).click();
Below is the code using Appium + C#, which is not working:
driver.FindElementById(“com.android.chrome:id/url_bar”).SendKeys(“https://www.gmail.com”);
driver.KeyEvent(AndroidKeyCode.Enter);
driver.FindElement(By.ClassName(“android.widget.EditText”)).SendKeys("[email protected]");
driver.HideKeyboard();
driver.FindElement(By.Name(“Next”)).Click();
driver.FindElement(By.ClassName(“android.widget.EditText”)).SendKeys(“test@123”);
driver.FindElement(By.Name(“Sign in”)).Click();
I am facing 2 issues in code using C#.
- Could not able to click on Sign in button.
- To enter email ([email protected]) in text field By.name is not working in C# but working fine in Java.
Can any one please help in this issue. Thanks in advance.