Selenious 1.0.0-alpha7
See the version list below for details.
dotnet add package Selenious --version 1.0.0-alpha7
NuGet\Install-Package Selenious -Version 1.0.0-alpha7
<PackageReference Include="Selenious" Version="1.0.0-alpha7" />
paket add Selenious --version 1.0.0-alpha7
#r "nuget: Selenious, 1.0.0-alpha7"
// Install Selenious as a Cake Addin
#addin nuget:?package=Selenious&version=1.0.0-alpha7&prerelease
// Install Selenious as a Cake Tool
#tool nuget:?package=Selenious&version=1.0.0-alpha7&prerelease
What is Selenious?
Selenious is a port of popular in Java-world test automation framework called Selenide. It defines API for you to write tests in human-readable language. It is base on Selenium WebDriver.
Here is example:
using static Selenious.Condition; using static Selenious.Selenious;
[Test]
public void Test()
{
Open("/login");
Element("#username").Val("AndrewSmith")
Element("#password").Val("SuperSecretPassword!");
Element("#submit").Click();
Element("#username").ShouldHave(Text("You logged in as Andrew"));
}
That's it, you could write you tests just like that. Selenious will take care for opening and closing browser.
To configure Selenious you could use Configuration class. It's quite simple. For example to set browser size you need to add command to you Set Up:
Configuration.BrowserSize = "1280x768";
To specify BaseUrl call:
Configuration.BaseUrl = "yourUrl";
after that you could call Open("/path/to/page") in you tests;
You could use reach assertion API like:
There are plenty of assertions that you could do on element by passing them to commands Should(), ShouldHave(), ShouldBe(), ShouldNot():
And,
Attr,
AttrWithValue,
CaseSensitiveText,
Checked,
CssClass,
CssValue,
Disabled,
Enabled,
ExactText,
ExactTextCaseSensitive,
Exist,
Focused,
Hidden,
MatchText,
Not,
Or,
Selected,
SelectedText,
Text,
Value,
Visible.
There also plenty of commands that you could execute on ISeleniousElement. Right now available:
Append,
Attr,
Click,
ContextClick,
DoubleClick,
DragAdnDropTo,
Exists,
Find,
FindAll,
GetDataAttribute,
Hover,
InnerHtml,
IsImage,
LastChild,
Matches,
Name,
GetValue,
IsDisplayed,
PressEnter,
PressTab,
SearchCriteria,
SelectOptionByValue,
SelectRadio,
SetValue,
Many shoulds (such as Should, ShouldHave etc.),
ToString,
ToWebElement,
Value,
Val,
WrappedElement,
WaitUntil
Difference between Should and WaitUntil is that second command will override default Timeout(which is 4 seconds by default, changeable through Configuration)
TODO: add more examples
Thanks for inspiration to
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- Castle.Core (>= 4.4.0)
- Microsoft.Extensions.Configuration (>= 3.0.0)
- Microsoft.Extensions.Configuration.CommandLine (>= 3.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 3.0.0)
- Microsoft.Extensions.Configuration.FileExtensions (>= 3.0.0)
- Microsoft.NET.Test.Sdk (>= 16.3.0)
- NLog (>= 4.6.7)
- NUnit (>= 3.12.0)
- Selenium.Support (>= 3.141.0)
- Selenium.WebDriver (>= 3.141.0)
- System.Threading (>= 4.3.0)
- WebDriverManager (>= 2.6.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Selenious:
Package | Downloads |
---|---|
AllureSelenious
This library adding Selenious steps to Allure Report |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.14 | 170 | 9/22/2023 |
1.0.13 | 527 | 5/18/2022 |
1.0.12 | 568 | 4/7/2022 |
1.0.11 | 425 | 9/1/2021 |
1.0.10 | 472 | 10/12/2020 |
1.0.9 | 584 | 9/11/2020 |
1.0.8 | 497 | 6/11/2020 |
1.0.7 | 668 | 2/25/2020 |
1.0.6 | 497 | 2/17/2020 |
1.0.5 | 444 | 2/14/2020 |
1.0.4 | 464 | 2/13/2020 |
1.0.3 | 467 | 2/13/2020 |
1.0.2 | 429 | 2/13/2020 |
1.0.1 | 502 | 2/12/2020 |
1.0.0 | 599 | 2/9/2020 |
1.0.0-alpha7 | 359 | 11/4/2019 |
1.0.0-alpha6 | 461 | 10/10/2019 |
1.0.0-alpha5 | 335 | 10/3/2019 |
1.0.0-alpha4 | 319 | 9/24/2019 |
1.0.0-alpha3 | 336 | 9/17/2019 |
1.0.0-alpha2 | 358 | 9/11/2019 |
1.0.0-alpha1 | 323 | 9/11/2019 |
1.0.0-alpha | 357 | 9/10/2019 |
Added Parent command;
Added GetClosest command;
Added SelectedOption command;
Added SelectedOptions command;
Added SelectedText command;
Added SelectedTextCommandTest;
Added SelectedValue command;
Added Text command.