-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocator_xpathmultipleattribute.java
More file actions
23 lines (19 loc) · 1.01 KB
/
Locator_xpathmultipleattribute.java
File metadata and controls
23 lines (19 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Locators;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class Locator_xpathmultipleattribute {
public static void main(String[] args) throws InterruptedException {
WebDriverManager.chromedriver().setup();
WebDriver driver=new ChromeDriver();
driver.get("https://login.salesforce.com/?ec=302&startURL=%2F00658000009BbTCAA0");
Thread.sleep(3000);
driver.findElement(By.xpath("//*[@class=\"input r4 wide mb16 mt8 username\"] [@type=\"email\"]")).sendKeys("vajra739@gmail.com");
Thread.sleep(3000);
driver.findElement(By.xpath("//*[@class=\"input r4 wide mb16 mt8 password\"] [@id=\"password\"]")).sendKeys("Sudha@12345");
driver.findElement(By.xpath("//*[@class=\"button r4 wide primary\"] [@type=\"submit\"]")).click();
//in login page it should shows error massage like please check the user name and password
System.out.println("Scrpit Sucess");
}
}