build cli

This commit is contained in:
Paul Schneider
2025-07-16 00:47:50 +01:00
parent a9b809f5e5
commit 124f3092fb
34 changed files with 7154 additions and 1232 deletions

View File

@ -0,0 +1,30 @@
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
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");
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;
driver.Quit();
}
}