-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGettingStartedButtonTest.cs
More file actions
42 lines (33 loc) · 1023 Bytes
/
GettingStartedButtonTest.cs
File metadata and controls
42 lines (33 loc) · 1023 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
34
35
36
37
38
39
40
41
42
using System;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace Selenium
{
public class GettingStartedButtonTest
{
IWebDriver driver;
[SetUp]
public void Setup()
{
driver = new ChromeDriver();
driver.Manage().Cookies.DeleteAllCookies();
driver.Manage().Window.Maximize();
driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);
driver.Navigate().GoToUrl(@"https://dotnetfiddle.net");
}
[Test]
public void VerifyGettingStartedButton()
{
driver.FindElement(By.XPath("//a[@href='/GettingStarted/']")).Click();
string expectedUrl = "https://dotnetfiddle.net/GettingStarted/";
string actualUrl = driver.Url;
Assert.AreEqual(expectedUrl, actualUrl);
}
[TearDown]
public void TearDown()
{
driver.Quit();
}
}
}