-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBringItOn .cs
48 lines (28 loc) · 1.29 KB
/
BringItOn .cs
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
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Interactions;
using OpenQA.Selenium.Support.UI;
namespace lab9_WebDriver;
public class BringItOn : TestsClass
{
//protected override string? Url => "https://pastebin.com";
private string nameValue = "how to gain dominance among developers";
private string codeValue = "git config --global user.name 'New Sheriff in Town' \ngit reset $(git commit-tree HEAD^{tree} -m 'Legacy code')\ngit push origin master --force";
[Test]
public void Test1()
{
var codeInput = findElement(By.Id("postform-text"));
codeInput.SendKeys(codeValue);
findElement(By.Id("select2-postform-format-container")).Click();
findElement(By.XPath("//li[text()='Bash']")).Click();
findElement(By.Id("select2-postform-expiration-container")).Click();
findElement(By.XPath("//li[text()='10 Minutes']")).Click();
var nameInput = findElement(By.Id("postform-name"));
nameInput.SendKeys(nameValue);
findElement(By.XPath("//button[@class='btn -big']")).Click();
Thread.Sleep(2000);
var selectedFormat = findElement("//a[@class='btn -small h_800']").Text;
Assert.IsTrue(selectedFormat == "Bash");
}
}