This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SeleniumFluentWait { | |
| public static void Main(string[] args) | |
| { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Manage().Window.Maximize(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SeleniumExplicitWaitExample { | |
| public static void Main(string[] args) | |
| { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Manage().Window.Maximize(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SeleniumImplicitWait { | |
| public static void Main(string[] args) | |
| { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Manage().Window.Maximize(); | |
| driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SeleniumJSAlertSample { | |
| public static void Main(string[] args) | |
| { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://the-internet.herokuapp.com/javascript_alerts"); | |
| driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HoverExample { | |
| public static void Main(string[] args) { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://the-internet.herokuapp.com/hovers"); | |
| driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RightClickDoubleClick { | |
| public static void Main(string[] args) { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://demo.guru99.com/test/simple_context_menu.html"); | |
| driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SeleniumSample { | |
| public static void Main(string[] args) { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://www.google.com/"); | |
| driver.Manage().Window.Maximize(); | |
| var search_field = driver.FindElement(By.Name("q")); | |
| search_field.SendKeys("Selenium"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GoogleResults { | |
| public static void Main(string[] args) { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://www.google.com/"); | |
| driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DropDownSample { | |
| public static void Main(string[] args) | |
| { | |
| new DriverManager().SetUpDriver(new ChromeConfig()); | |
| var driver = new ChromeDriver(); | |
| driver.Navigate().GoToUrl("https://the-internet.herokuapp.com/dropdown"); | |
| driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using OpenQA.Selenium; | |
| using OpenQA.Selenium.Chrome; | |
| using OpenQA.Selenium.Edge; | |
| using WebDriverManager; | |
| using WebDriverManager.DriverConfigs.Impl; | |
| using OpenQA.Selenium.Support.UI; | |
| namespace LearnSelenium { | |
| public class SeleniumAllLocators { |