![]() |
VOOZH | about |
dotnet add package BurnSoft.Testing.Web.Selenium --version 1.0.0.45
NuGet\Install-Package BurnSoft.Testing.Web.Selenium -Version 1.0.0.45
<PackageReference Include="BurnSoft.Testing.Web.Selenium" Version="1.0.0.45" />
<PackageVersion Include="BurnSoft.Testing.Web.Selenium" Version="1.0.0.45" />Directory.Packages.props
<PackageReference Include="BurnSoft.Testing.Web.Selenium" />Project file
paket add BurnSoft.Testing.Web.Selenium --version 1.0.0.45
#r "nuget: BurnSoft.Testing.Web.Selenium, 1.0.0.45"
#:package BurnSoft.Testing.Web.Selenium@1.0.0.45
#addin nuget:?package=BurnSoft.Testing.Web.Selenium&version=1.0.0.45Install as a Cake Addin
#tool nuget:?package=BurnSoft.Testing.Web.Selenium&version=1.0.0.45Install as a Cake Tool
This library was created to simplify testing out a website using Selenium. All you have to do is add which interface that you want to use (Chrome, IE, Edge, etc) and add the code required for that interface to initialize the module.
Then in your main test you just have to add the tags and and types of tags and actions that you want to perform.
I do recommend using the Selenium Chrome IDE to first walk through what you want to do with the site, then use that session capture to get the names of the id's, xpaths, etc that you want to step through with your tests.
If there is an error, it will perform a screen shot capture and store it in a directory of your choosing so you can see what the error might be.
[TestClass]
public class TestPublicSideChrome : iChromeActions
{
/// <summary>
/// Access Selenium Chrome Actions Class
/// </summary>
/// <value>The ca.</value>
public ChromeActions Ca { get; set; }
/// <summary>
/// Gets or sets the main URL.
/// </summary>
/// <value>The main URL.</value>
public string MainUrl { get; set; }
/// <summary>
/// Gets or sets the usr login.
/// </summary>
/// <value>The usr login.</value>
public string UsrLogin { get; set; }
/// <summary>
/// Gets or sets the usr password.
/// </summary>
/// <value>The usr password.</value>
public string UsrPwd { get; set; }
/// <summary>
/// The settings screen shot location
/// </summary>
/// <value>The settings screen shot location.</value>
public string SettingsScreenShotLocation { get; set; }
/// <summary>
/// The full exception path
/// </summary>
/// <value>The full exception path.</value>
public string FullExceptionPath { get; set; }
/// <summary>
/// Gets or sets the pages login.
/// </summary>
/// <value>The pages login.</value>
public string PagesLogin { get; set; }
/// <summary>
/// Logs the in.
/// </summary>
/// <param name="testName">Name of the test.</param>
/// <exception cref="NotImplementedException"></exception>
public void LogIn(string testName)
{
throw new NotImplementedException();
}
/// <summary>
/// Logs the out.
/// </summary>
/// <exception cref="NotImplementedException"></exception>
public void LogOut()
{
throw new NotImplementedException();
}
/// <summary>
/// Closes this instance.
/// </summary>
[TestCleanup]
public void Close()
{
Ca.Dispose();
}
/// <summary>
/// Initializes this instance.
/// </summary>
[TestInitialize]
public void Init()
{
MainUrl = "http://www.burnsoft.test";
SettingsScreenShotLocation = "c:\pics\";
FullExceptionPath = SettingsScreenShotLocation;
if (!Directory.Exists(FullExceptionPath)) Directory.CreateDirectory(FullExceptionPath);
}
/// <summary>
/// Defines the test method CheckPublic.
/// </summary>
[TestMethod]
public void CheckPublic()
{
Ca = new ChromeActions();
Ca.TestName = "PublicUI";
Ca.Url = MainUrl;
Ca.SettingsScreenShotLocation = SettingsScreenShotLocation;
Ca.DoSleep = true;
Ca.Initializer();
Ca.WaitTillElementFound("//ul[@id='jetmenu']/li[3]/a", GeneralActions.FindBy.XPath, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("My Gun Collection", GeneralActions.FindBy.LinkText, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("//ul[@id='jetmenu']/li[3]/a", GeneralActions.FindBy.XPath, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("My Loaders Log", GeneralActions.FindBy.LinkText, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("//ul[@id='jetmenu']/li[3]/a", GeneralActions.FindBy.XPath, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("File Renamer Utility", GeneralActions.FindBy.LinkText, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("//ul[@id='jetmenu']/li[3]/a", GeneralActions.FindBy.XPath, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("BurnPad", GeneralActions.FindBy.LinkText, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("//ul[@id='jetmenu']/li[7]/a", GeneralActions.FindBy.XPath, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("Contact", GeneralActions.FindBy.LinkText, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("MainContent_txtName", GeneralActions.FindBy.Id, GeneralActions.MyAction.SendKeys,"Jimmy Pop Corn");
Ca.FindElements("MainContent_txteMail", GeneralActions.FindBy.Id, GeneralActions.MyAction.SendKeys,"joe.mireles@burnsoft.net");
Ca.FindElements("MainContent_txtMsg", GeneralActions.FindBy.Id, GeneralActions.MyAction.SendKeys,"Make software great again!");
Ca.FindElements("MainContent_btnSend", GeneralActions.FindBy.Id, GeneralActions.MyAction.Click);
Ca.WaitTillElementFound("MainContent_Label4", GeneralActions.FindBy.Id, GeneralActions.MyAction.Nothing);
}
}
Happy Testing!
Initial Release
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Framework | net472 net472 is compatible. net48 net48 is compatible. net481 net481 was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Updated Selenium Libraries, and increased wait time based on cpu speed