Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
1.9k views
by

Hi,I am learning Selenium Webdriver. I was trying to login "Quora" through Google. but in the email typing section, the code is not working. I am not able to figure out what is the problem. Please help. Below is my code

import org.openqa.*;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class Demo2 {
	public static void main(String[] args) { 
		System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
		WebDriver driver=new ChromeDriver();
		String url="https://quora.com";
		driver.get(url);
		WebElement ele1=driver.findElement(By.className("google_button_text"));
		ele1.click();
		
		//WebElement e1=driver.findElement((By.xpath("//*[@id='identifierId']")));
		//e1.sendKeys("Welcome");
		
		WebElement email1=driver.findElement(By.name("identifier"));
		email1.sendKeys("fggffgfd"); 
		WebElement next1=driver.findElement(By.className("RveJvd snByac")); //whsOnd zHQkBf
		next1.click();
		WebElement password=driver.findElement(By.className("whsOnd zHQkBf"));
		password.click();
		password.sendKeys("Sffgdffdf3");
		WebElement next2=driver.findElement(By.className("RveJvd snByac")); //whsOnd zHQkBf
		next2.click();
		}
}

2 Answers

0 like 0 dislike
by Master (1.2k points)
It looks like you have an issue with your chromedriver.

Upgrade your chromedriver and try again.

Let us know your findings.

Here is the link to get the latest chromdriver: https://sites.google.com/a/chromium.org/chromedriver/downloads
0 like 0 dislike
by Expert (748 points)
can you please share the error,also may be chromedriver issues


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...