I can't fill the password in the password field. I am not sure where am I wrong. The current code that I am using is filling the password in the same field with the email address. I am using the following code:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace Cube
{
[TestClass]
public class Setup
{
static IWebDriver driverGC;
[AssemblyInitialize]
public static void SetUp(TestContext context)
{
driverGC = new ChromeDriver();
}
[TestMethod]
public void TestChromeDriver()
{
driverGC.Navigate().GoToUrl("https://google.com");
driverGC.FindElement(By.Id("gb_70")).Click();
driverGC.FindElement(By.CssSelector("#identifierId.whsOnd.zHQkBf")).SendKeys("mail@gmail.com");
driverGC.FindElement(By.CssSelector("#identifierId.whsOnd.zHQkBf")).Click();
driverGC.FindElement(By.CssSelector(".whsOnd.zHQkBf")).SendKeys("password123");
driverGC.FindElement(By.CssSelector(".whsOnd.zHQkBf")).Click();
driverGC.Navigate().GoToUrl("https://google.com");
}
}
}
Thanks!