Skip to content

Contains Sample code for implementing Automation with Selenium in C#

Notifications You must be signed in to change notification settings

DanBiel2019/Automation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium WebDriver Demo

This repository contains sample code for implementing Automation for Selenium's WebDriver.

What does the Sample/Demo code do?

  • Opens the Firefox Browser
  • Navigates to http://bing.com
  • Finds the search box by using FindElementById(“sb_form_q”)
  • Fills in the identified text butterfly in the search box
  • Finds the search button using FindElementById(“sb_form_go”)
  • Clicks on the identified search button. So the bing will return the search results.
  • Finds the first item from the search results using * FindElementByCssSelector(“#b_results li.b_algo h2 a”)
  • Clicks on the identified first item and navigates to the first link

NuGet Packages used

Selenium.Firefox.WebDriver

This packages contains driver for GECKO and it gets copied to the Run or Debug directory

Selenium.Chrome.WebDriver

This packages contains driver for CHROME and it gets copied to the Run or Debug directory

Driver Classes

FirefoxDriver and ChromeDriver classes are inherited from RemoteWebDriver class

RemoteWebDriver class implements multiple interfaces and some are IWebDriver, IDisposable, IJavaScriptExecutor and so on

Firefox Add On

In case if you are using Firefox please install the Selenium addon.

About

Contains Sample code for implementing Automation with Selenium in C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%