Fixes the UI testing wwwroot
This commit is contained in:
parent
e83ef7730b
commit
e137c3e2ff
10 changed files with 35 additions and 14 deletions
|
|
@ -1,16 +1,35 @@
|
|||
using System;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using OpenQA.Selenium.Firefox;
|
||||
using Xunit.Abstractions;
|
||||
using yavscTests;
|
||||
using yavscTests.ServerFixtures;
|
||||
|
||||
namespace SeleniumDocs.GettingStarted;
|
||||
|
||||
public static class FirstScript
|
||||
{
|
||||
public static void DoTestSeleniumWebSite()
|
||||
{
|
||||
IWebDriver driver = new ChromeDriver();
|
||||
|
||||
driver.Navigate().GoToUrl("https://www.selenium.dev/selenium/web/web-form.html");
|
||||
[Collection("Yavsc Server")]
|
||||
public class FirstScript : BaseTestContext
|
||||
{
|
||||
public readonly WebServerFixture _serverFixture;
|
||||
readonly ITestOutputHelper _output;
|
||||
|
||||
public FirstScript(ITestOutputHelper output, WebServerFixture fixture) : base(output, fixture)
|
||||
{
|
||||
_serverFixture = fixture;
|
||||
this._output = output;
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void DoTestSeleniumWebSite()
|
||||
{
|
||||
var firefoxOptions = new FirefoxOptions();
|
||||
firefoxOptions.AcceptInsecureCertificates = true;
|
||||
|
||||
var driver = new FirefoxDriver(firefoxOptions);
|
||||
driver.Navigate().GoToUrl(_serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("https:")));
|
||||
|
||||
var title = driver.Title;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue