- 💚 Add support for traditional By locators (#74)
- ➕ Locate elements by multiple classes in an element's class attribute (#72)
- ➕ ::: Implemented
Locator.AtPosition(int position)
to allow choosing an element at a specific index when there are multiple with the same locator properties. - 💚 ::: Updated GitHub build workflow to use docker-compose to spin up Selenoid and a custom version of The Internet (https://the-internet.herokuapp.com).
- ❌ ::: Make
Element.Exists
obsolete and use the same code inElement.Displayed
.
- [NEW ✨] Elements can be located based on properties it doesn't have.
- To find a div tag with "foo" as a class name:
DivTag.WithClass("foo")
- To find a div tag without "foo" as a class name:
DivTag.WithClass("foo", false)
- To find a div tag with "foo" as a class name:
- [HOUSEKEEPING 🧹] Added ability to configure "HideCommandPromptWindow". It is true by default.
- [HOUSEKEEPING 🧹] Add missing
Screen
andScreenComponent
base classes.
- [NEW ✨] Added
Use<TPage>()
method to PageCollection - [NEW ✨] Added overloads for
Use<TPage>()
that returns the page instance
- [NEW ✨] Added
Screen
type equivalents forPageMap
,Page
andPage<TPageMap>
- [HOUSEKEEPING 🧹] Changed PageMap property protection level from public to protected (#58)
- [HOUSEKEEPING 🧹] Removed IHtmlElements interface
- [HOUSEKEEPING 🧹] Removed Interfaces directory
- [HOUSEKEEPING 🧹] Some minor cleanup
- [FIX 💪🏾]
Element.WithText("$|someString")
was not using the correct xpath to locate elements with text that ends with a given string
- [NEW ✨] Add capabilities from JSON config
- [NEW ✨] Add
Precedes()
,Follows()
,Child()
, andParent()
methods toLocator() and Element()
classes.- Ex:
DivTag.Parent()
=> Locates the parent of adiv
tag. - Ex:
DivTag.Child()
=> Locates the child of adiv
tag. - Ex:
DivTag.Precedes(SpanTag)
=> Locates adiv
tag that precedes anotherspan
tag. - Ex:
DivTag.Follows(SpanTag)
=> Locates adiv
tag that follows anotherspan
tag.
- Ex:
- [REFACTOR 🛠] YET ANOTHER overhaul to web driver management. Here is the short list:
- Added mapper classes that map the APIs of driver options and services for Firefox, Chrome, and IE to a common API. This has always been the goal with each iteration of this part of the framework. But this time I prioritized clarity and maintainability.
- Renamed Browser to BrowserSession to prevent namespace collisions with classes in
Basin.Core
.
- [NEW ✨] Added an
ElementTimeout
property toIBrowserConfig
used in theElement
class as a default inline timeout. - [NEW ✨] Added an
IfTextMatches(string pattern)
method toElement
class that returns the element if text matches and throws an error if it doesn't. - [HOUSEKEEPING 🧹] Cleaned up
Element
class by removed unnecessary overload constructors. All element locations are based entirely on ILocatorBuilder.
- [FIX] Classes can't be named identically to namespaces. Renamed
Basin()
class toBasinEnv()
to fix namespace issues, but also to be more indicitive of its purpose.
- [NEW] Added more html tags.
- [STRUCTURAL] Renamed static
Driver
class toBrowser
- [STRUCTURAL] Renamed
BSN
toBasin
.
This is mostly comprised of underlying structural changes and CI/CD updates.
- [NEW] Automated nuget publishing and github releases
- [BREAKING CHANGE]
BSN.*
is nowBasin.*
- [BREAKING CHANGE]
DriverFactory()
renamed toBrowserFactory()
and updated to use decorators
- [FIX] PageCollections would throw a duplicate key error. It just returns if the key already exists.
- [NEW] New
Locator()
class that builds an XPath selector for you and returnsBy.XPath
. If more advance XPath usage is need, Just use the existingLocate
methods.- Usage:
new Locator("table").WithId("earningsTable").By;
- Usage:
- [NEW] Add semantic locate methods. Its possible that there are some missing elements not very commonly used for browser automation. These initial methods should cover most if not all use cases. The
Element()
class was updated with an overload constructor that uses the newLocator()
class.- Current:
public Element LoginButton => Locate(By.CssSelector(".loginBtn"))
; - New:
public Element LoginButton => Button.WithClass("loginBtn");
- Current: