forked from CourseRepository/SeleniumWebdriverWithJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestKeyBoard.java
More file actions
33 lines (27 loc) · 830 Bytes
/
TestKeyBoard.java
File metadata and controls
33 lines (27 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package testcase;
import helper.StartWebDriver;
import helper.WindowHelper;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;
/**
* @author - rahul.rathore
* @date - 16-Nov-2014
* @project - Webdriver
* @package - testcase
* @file name - TestKeyBoard.java
*/
public class TestKeyBoard extends StartWebDriver {
@Test
public void testKey() {
WindowHelper.navigateToPage(file.getUrl());
Actions act = new Actions(driver);
act.keyDown(driver.findElement(By.id("quicksearch_top")),Keys.SHIFT)
.sendKeys(driver.findElement(By.id("quicksearch_top")),"f")
.sendKeys(driver.findElement(By.id("quicksearch_top")),"x")
.keyUp(driver.findElement(By.id("quicksearch_top")),Keys.SHIFT)
.build()
.perform();
}
}