3. View Elements for Selenium - deftpack/testautomation GitHub Wiki

The main purpose of the page elements to abstract away from the mark-up, by providing types that represents recognizable UI concepts, which than can be used for interaction with the view regardless of the actual implementation.

All elements can be found under the DeftPack.TestAutomation.Selenium.PageObjects.Elements namespace There are four main categories plus a special element.

Activators

Everything that designed to initiate a new action in the browser falls under this category. They have a Text or image to indicate the nature of the action, making clear what the user can expect. The activation happens by a Click.

  • Button: main targets for interaction
  • Link: special in a sense that it is also a container

Containers

From functional perspective they are less relevant, because their main goal is to hold other elements, and so they don't provide possibility for interaction just by themselves. However they have semantic meaning, and their presence or state could provide important information.

  • Form: the URL where the data will be submitted can be accessed with the Action property
  • Frame: embedding another page into the active one. The property holding the URL is called Source

Inputs

Sending any piece of information is happening with the help of these elements. Each of them provides opportunity to change their state, which then can influence the user journey.

  • CheckBox: the boolean IsSelected property indicates the state, which can be changed with the SetState and Toogle methods
  • Dropdown:
  • FileUploader:
  • NumberInput:
  • RadioButton:
  • TextBox:

Media

  • Image
  • Label

Table

  • Header
  • Footer
  • Body

Row Cell

⚠️ **GitHub.com Fallback** ⚠️