Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Aquality Selenium is a library built over Selenium WebDriver tool that allows to automate work with web browsers. Selenium WebDriver requires some skill and experience. So, Aquality Selenium suggests simplified and most importantly safer and more stable way to work with Selenium WebDriver.

License

NotificationsYou must be signed in to change notification settings

aquality-automation/aquality-selenium-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusQuality GateNuGet

Aquality Selenium for .NET

Overview

This package is a library designed to simplify your work with Selenium WebDriver.

You've got to use this set of methods, related to most common actions performed with web elements.

Most of performed methods are logged using NLog, so you can easily see a history of performed actions in your log.

We use interfaces where is possible, so you can implement your own version of target interface with no need to rewrite other classes.

Quick start

To start the project using Aquality.Selenium framework, you candownload our template BDD project by this link.

Alternatively, you can follow the steps below:

  1. Add the nuget dependency Aquality.Selenium to your project.

  2. Create instance of Browser in your test method:

varbrowser=AqualityServices.Browser;
  1. Use Browser's methods directly for general actions, such as navigation, window resize, scrolling and alerts handling:
browser.Maximize();browser.GoTo("https://wikipedia.org");browser.WaitForPageToLoad();
  1. Use ElementFactory class's methods to get an instance of each element:
varemailTextBox=AqualityServices.Get<IElementFactory>().GetTextBox(By.Id("email_create"),"Email");

Or you can inherit a class from Form class and use existing ElementFactory:

privateITextBoxEmailTextBox=> ElementFactory.GetTextBox(By.Id("email_create"), "Email");
  1. Call element's methods to perform action with element:
emailTextBox.Type("email@domain.com");
  1. Handle basic authentication:
Assert.DoesNotThrowAsync(()=>browser.RegisterBasicAuthenticationAndStartMonitoring("domain.com","username","password"),"Should be possible to set basic authentication async");

or intercept network requests/responses:

browser.Network.AddRequestHandler(newNetworkRequestHandler{RequestMatcher= req=>true,ResponseSupplier= req=>newHttpResponseData{Body="my body content",StatusCode=200}});Assert.DoesNotThrowAsync(()=>browser.Network.StartMonitoring());

see more examples atNetworkHandlingTests.

  1. Emulate GeoLocation, Device, Touch, Media, UserAgent overrides, Disable script execution and more using DevTools extensions:
constdoublelatitude=35.8235;constdoublelongitude=-78.8256;constdoubleaccuracy=0.97;Assert.DoesNotThrowAsync(()=>DevTools.SetGeoLocationOverride(latitude,longitude,accuracy),"Should be possible to override geoLocation")
  1. Quit browser at the end:
browser.Quit();

Documentation

To get more details please look at wiki:

License

Library's source code is made available under theApache 2.0 license.

About

Aquality Selenium is a library built over Selenium WebDriver tool that allows to automate work with web browsers. Selenium WebDriver requires some skill and experience. So, Aquality Selenium suggests simplified and most importantly safer and more stable way to work with Selenium WebDriver.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors9


[8]ページ先頭

©2009-2025 Movatter.jp