-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICanWinTests.cs
53 lines (27 loc) · 1008 Bytes
/
ICanWinTests.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
49
50
51
52
53
using lab9_WebDriver.Page;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Interactions;
using OpenQA.Selenium.Support.UI;
namespace lab9_WebDriver;
public class ICanWinTests : TestsClass
{
//protected override string? Url => "https://pastebin.com";
private By btCreateNewPaste = By.XPath("//button[text()='Create New Paste']");
private By msgError = By.XPath("//div[@class='error-summary']");
private string codeValue = "Hello from WebDriver";
private string titleValue = "helloweb";
[Test]
public void Test1()
{
var home = new PasteBinHomePage();
//home.CreateNewPaste().EnterDefaultValues();
var btPaste = findElement(btCreateNewPaste);
btPaste.Click();
Thread.Sleep(2000);
//var errorMsg = driver.FindElement(msgError);
var currentUrl = driver.Url;
//Assert.IsTrue(currentUrl != Url);
}
}