tzatziki icon indicating copy to clipboard operation
tzatziki copied to clipboard

[Tzatziki Front] interfaces (Browser, HTMLElement, Action)

Open alexandrepa opened this issue 11 months ago • 0 comments

This root module defined 3 important interfaces that will be used to interact with front components :

Browser
Interface that expose method to manipulate the browser

  • get(url) : navigate to the provided url
  • find(cssSelector) : return a list of HTMLElement from the css selectors
  • actionOn(cssSelector, action , params) : perform specified action on list of HTMLElement that match the css selector
  • waitForElement(cssSelector, isVisible) : wait until this cssSelector is available on page (and visible if needed)
  • waitForUrl(url) : wait until the browser is redirected to this url
  • reload() : reload page with current url

We can notice that we can add a timeout parameter on a lof of those methods with default value.
cssSelector accept CSS or XPath format

Keyboard press ? waitForPopup ?

HTMLElement
Interface that expose method to manipulate HTMLElement

  • getId() : return id of the html element
  • getClasses() : return classes of the html element
  • getAttributes() : return a Map of the attributes of the html element

Action
Enum of actions that can be made on an HTMLElement

  • CLICK
  • FILL

alexandrepa avatar Mar 29 '24 16:03 alexandrepa