Code 2
Code 2
Code 2
By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
////tagName[@attribute='value'] - xpath
/* driver.findElement(By.xpath("//*[@type='email']")).sendKeys("myown
xpath");
driver.findElement(By.xpath("//input[@id='pass']")).sendKeys("hello");
driver.findElement(By.xpath("//input[@value='Log In']")).click();*/
//tagName[v='value'] -CSS
driver.findElement(By.cssSelector("input[name='email']")).sendKeys("myowncss");
driver.findElement(By.cssSelector("[value='Log In']")).click();