browserTest NUnit Visual Studio 2022

This commit is contained in:
Lukáš Kaňka 2023-08-23 10:50:13 +02:00
parent 17a25a0206
commit 3e9fdb55de
12 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using NUnit.Framework;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Edge;
namespace SeleniumNunitProject.Tests
{
internal class BrowsersTests
{
[Test]
public void ChromeBrowser()
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.selenium.dev/");
Assert.That(driver.Title, Is.EqualTo("Selenium"));
driver.Quit();
}
[Test]
public void FirefoxBrowser()
{
IWebDriver driver = new FirefoxDriver();
driver.Navigate().GoToUrl("https://www.selenium.dev/");
Assert.That(driver.Title, Is.EqualTo("Selenium"));
driver.Quit();
}
[Test]
public void EdgeBrowser()
{
IWebDriver driver = new EdgeDriver();
driver.Navigate().GoToUrl("https://www.selenium.dev/");
Assert.That(driver.Title, Is.EqualTo("Selenium"));
driver.Quit();
}
}
}

View File

@ -1 +1 @@
0837453f469d3143963efb8c6ffeeb1c7e69b3b9
bf9d96cdfaa00196e6c2829b629f02ec978b77c1