-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutPageTest.cs
More file actions
43 lines (34 loc) · 1.1 KB
/
AboutPageTest.cs
File metadata and controls
43 lines (34 loc) · 1.1 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
using System;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace Selenium
{
public class AboutPageTest
{
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 VerifyAboutPage()
{
driver.FindElement(By.XPath("//*[@id='top-navbar']/div[3]/div[2]/button")).Click();
driver.FindElement(By.XPath("//*[@id='top-navbar']/div[3]/div[2]/ul/li[10]")).Click();
string expectedTitle = "Contact us | C# Online Compiler | .NET Fiddle";
string actualTitle = driver.Title;
Assert.AreEqual(expectedTitle, actualTitle);
}
[TearDown]
public void TearDown()
{
driver.Quit();
}
}
}