Created
April 4, 2017 10:10
-
-
Save jatin360/cad4278ae4128ddc8f1acef595ba4148 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.training.script; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
public class Evention { | |
public static void main(String[] args) throws InterruptedException { | |
System.setProperty("webdriver.chrome.driver", "D://chromedriver.exe"); | |
WebDriver driver = new ChromeDriver(); | |
driver.get("https://securedrop-alpha.eventionlive.com"); | |
driver.manage().window().maximize(); | |
WebElement UserName = driver.findElement(By.xpath("//input[@id='inputUsername']")); | |
UserName.sendKeys("D102"); | |
WebElement Password = driver.findElement(By.xpath("//input[@id='inputPassword']")); | |
Password.sendKeys("evention"); | |
WebElement Button = driver.findElement(By.xpath("//button[contains(text(), 'Log On')]")); | |
Button.click(); | |
Thread.sleep(5000); | |
WebElement Drops = driver.findElement(By.xpath("//a[@class='dropdown-toggle'][contains(text(), 'Drops')]")); | |
Drops.click(); | |
WebElement DropLink = driver.findElement(By.xpath("//li[@class='dropdown open']/ul/li/a[@href='/Drops/DropList']")); | |
DropLink.click(); | |
WebElement DropButton = driver.findElement(By.xpath("//div[@class='col-md-2']/a[@id='btnNewDrop']")); | |
DropButton.click(); | |
Thread.sleep(5000); | |
WebElement EmployeeField = driver.findElement(By.xpath("//li[@style='padding:1px 0px 0px']/span[@class='k-widget k-dropdown k-header']")); | |
EmployeeField.click(); | |
Thread.sleep(3000); | |
WebElement SelectEmployee = driver.findElement(By.xpath("//div[@class='k-list-scroller']/ul[@id='Model_EmployeeId_listbox']/li[3]")); | |
SelectEmployee.click(); | |
Thread.sleep(3000); | |
WebElement DepartmentField = driver.findElement(By.xpath("//li[@style='padding:2px 0px']/span[@class='k-widget k-dropdown k-header']")); | |
DepartmentField.click(); | |
Thread.sleep(3000); | |
WebElement SelectDepartment = driver.findElement(By.xpath("//div[@class='k-list-scroller']/ul[@id='Model_DepartmentId_listbox']/li[1]")); | |
SelectDepartment.click(); | |
WebElement Checks = driver.findElement(By.xpath("//td[contains(text(), 'Checks')]")); | |
Checks.click(); | |
Thread.sleep(3000); | |
WebElement AddButton = driver.findElement(By.xpath("//button[@id='DropItemCategory293GridAddButton']")); | |
AddButton.click(); | |
WebElement CheckType = driver.findElement(By.xpath("//td[@id='DropItemCategory293Grid_active_cell']/span/span/span[@class='k-input']")); | |
CheckType.click(); | |
WebElement SelectType = driver.findElement(By.xpath("//div[@class='k-list-scroller']/ul[@id='DropItemTypeId_listbox']/li[4]")); | |
SelectType.click(); | |
WebElement CheckNumber = driver.findElement(By.xpath("//tr[@class='k-grid-edit-row']/td[2]")); | |
CheckNumber.click(); | |
CheckNumber.sendKeys("576347"); | |
WebElement Amount = driver.findElement(By.xpath("//tr[@class='k-grid-edit-row']/td[4]")); | |
Amount.click(); | |
Amount.sendKeys("10000"); | |
WebElement SubmitButton = driver.findElement(By.xpath("//button[@id='DropListCloseButton']")); | |
SubmitButton.click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment