tnypxl / BasinFramework

An opinionated browser test framework built around Selenium WebDriver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement builder pattern for elements and locators

tnypxl opened this issue · comments

The goal is to be able to off a more semantic API for defining elements and abstract away reliance on knowing with By method to use.

Possible final API:

// Simple definitions
public Element SomeButton => Button("#theButton");
public Element RegistrationForm => Div(".registerForm form.stepOne");

// w/ Scoping
public Element SomeButton => Button("#theButton").Inside(Div(".actionBar"));
public Element SectionLabel(string text) => Span(".sectionLabel").WithText(text);