forked from florentbr/SeleniumBasic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTS_Actions.cs
More file actions
50 lines (43 loc) · 1.39 KB
/
TS_Actions.cs
File metadata and controls
50 lines (43 loc) · 1.39 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Selenium.Tests.Internals;
using SetUp = NUnit.Framework.SetUpAttribute;
using TestCase = NUnit.Framework.TestCaseAttribute;
using TestFixture = NUnit.Framework.TestFixtureAttribute;
namespace Selenium.Tests {
[TestFixture(Browser.Firefox)]
[TestFixture(Browser.Opera)]
[TestFixture(Browser.Chrome)]
[TestFixture(Browser.IE)]
[TestFixture(Browser.PhantomJS)]
class TS_Actions : BaseBrowsers {
public TS_Actions(Browser browser)
: base(browser) { }
[SetUp]
public void SetUp() {
driver.Get("/input.html");
}
[TestCase]
public void ShouldPerformActionsWithoutFailures() {
var ele = driver.FindElementById("input__search");
driver.Actions
.Click(ele)
.Click()
.ClickAndHold()
.Release()
.ClickAndHold(ele)
.Release()
.ClickDouble()
.ClickDouble(ele)
.DragAndDrop(ele, ele)
.DragAndDropByOffset(ele, 10, 10)
.KeyDown(Keys.Control, ele)
.KeyUp(Keys.Control)
.MoveByOffset(30, 87)
.MoveToElement(ele)
.SendKeys("abcd")
.Wait(0)
.ClickContext()
.ClickContext(ele)
.Perform();
}
}
}