Fixes the css
This commit is contained in:
parent
348e22f1c9
commit
cba18df870
11 changed files with 124 additions and 77 deletions
|
|
@ -1,33 +1,58 @@
|
|||
using System;
|
||||
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using Xunit.Abstractions;
|
||||
using Yavsc.Tests;
|
||||
|
||||
namespace SeleniumDocs.GettingStarted;
|
||||
namespace yavscTests.ServerFixtures;
|
||||
|
||||
[Collection("Yavsc Server")]
|
||||
[Trait("regression", "oui")]
|
||||
public static class FirstScript
|
||||
|
||||
[Collection("Yavsc Server")]
|
||||
|
||||
public class FirstScript : BaseTestContext
|
||||
{
|
||||
[Fact]
|
||||
public static void DoTestSeleniumWebSite()
|
||||
{
|
||||
IWebDriver driver = new ChromeDriver();
|
||||
public readonly WebServerFixture _serverFixture;
|
||||
readonly ITestOutputHelper _output;
|
||||
|
||||
driver.Navigate().GoToUrl("https://www.selenium.dev/selenium/web/web-form.html");
|
||||
IWebDriver driver = new ChromeDriver();
|
||||
public FirstScript(ITestOutputHelper output, WebServerFixture fixture) : base(output, fixture)
|
||||
{
|
||||
_serverFixture = fixture;
|
||||
this._output = output;
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task DoTestYavscSite()
|
||||
{
|
||||
var chromeOptions = new ChromeOptions
|
||||
{
|
||||
AcceptInsecureCertificates = true
|
||||
};
|
||||
|
||||
var driver = new ChromeDriver(chromeOptions);
|
||||
var url = _serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("https:"));
|
||||
Assert.NotNull(url);
|
||||
driver.Navigate().GoToUrl(url);
|
||||
|
||||
var title = driver.Title;
|
||||
|
||||
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(500);
|
||||
|
||||
var textBox = driver.FindElement(By.Name("my-text"));
|
||||
var submitButton = driver.FindElement(By.TagName("button"));
|
||||
|
||||
textBox.SendKeys("Selenium");
|
||||
submitButton.Click();
|
||||
|
||||
var message = driver.FindElement(By.Id("message"));
|
||||
var value = message.Text;
|
||||
|
||||
var navbar = driver.FindElement(By.Id("navbar"));
|
||||
Assert.NotNull(navbar);
|
||||
/*
|
||||
var textBox = driver.FindElement(By.Name("my-text"));
|
||||
var submitButton = driver.FindElement(By.TagName("button"));
|
||||
|
||||
textBox.SendKeys("Selenium");
|
||||
submitButton.Click();
|
||||
|
||||
var message = driver.FindElement(By.Id("message"));
|
||||
var value = message.Text;
|
||||
*/
|
||||
driver.Quit();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue