Packages

  • package root
    Definition Classes
    root
  • package zinteract
    Definition Classes
    root
  • package alert

    Alert provides a way to interact purely with alert.

    Alert provides a way to interact purely with alert.

    Definition Classes
    zinteract
  • package builder

    Builder provides methods to create driver easily and purely.

    Builder provides methods to create driver easily and purely.

    Definition Classes
    zinteract
  • package context

    Context provides methods to find an element which are use by webdriver and element packages.

    Context provides methods to find an element which are use by webdriver and element packages.

    Definition Classes
    zinteract
  • package element

    Element provides a way to interact purely with webelement

    Element provides a way to interact purely with webelement

    val effect = for {
       _          <- session.link("https://www.selenium.dev/documentation/en/")
       search     <- session.findElement(By.cssSelector("[type=search]"))
       _          <- search.sendKeysM("Introduction")
    } yield ()
    
    app.provideCustomLayer(ChromeBuilder(pathToDriver).buildLayer >>> session.Session.Service.live)
    Definition Classes
    zinteract
  • ZinteractWebElement
  • package example
    Definition Classes
    zinteract
  • package webdriver

    Provides some tools to use Selenium WebDriver has ZLayer that are mandatory to use when dealing with Zinteract.

    Provides some tools to use Selenium WebDriver has ZLayer that are mandatory to use when dealing with Zinteract.

    Definition Classes
    zinteract
p

zinteract

element

package element

Element provides a way to interact purely with webelement

val effect = for {
   _          <- session.link("https://www.selenium.dev/documentation/en/")
   search     <- session.findElement(By.cssSelector("[type=search]"))
   _          <- search.sendKeysM("Introduction")
} yield ()

app.provideCustomLayer(ChromeBuilder(pathToDriver).buildLayer >>> session.Session.Service.live)
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. element
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit class ZinteractWebElement extends AnyRef

    Provides implicit definition for fonction of element that can be called directly from a webelement.

Value Members

  1. def clearOn(element: WebElement): Task[Unit]

    If this element is a text entry element, this will clear the value.

    If this element is a text entry element, this will clear the value. Has no effect on other elements. Text entry elements are INPUT and TEXTAREA elements.

    Note that the events fired by this event may not be as you'd expect. In particular, we don't fire any keyboard or mouse events.

  2. def clickOn(element: WebElement): Task[Unit]

    Click this element.

    Click this element. If this causes a new page to load, you should discard all references to this element and any further operations performed on this element will throw a StaleElementReferenceException.

    Note that if click() is done by sending a native event (which is the default on most browsers/platforms) then the method will _not_ wait for the next page to load and the caller should verify that themselves.

    There are some preconditions for an element to be clicked. The element must be visible and it must have a height and width greater then 0.

  3. def getAttributeOf(element: WebElement)(name: String): Task[String]

    Gets the value of the given attribute of the element.

    Gets the value of the given attribute of the element. Will return the current value, even if this has been modified after the page has been loaded.

    More exactly, this method will return the value of the property with the given name, if it exists. If it does not, then the value of the attribute with the given name is returned. If neither exists, null is returned.

    The "style" attribute is converted as best can be to a text representation with a trailing semi-colon.

    The following are deemed to be "boolean" attributes, and will return either "true" or null:

    async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, truespeed, willvalidate

    Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:

    • If the given name is "class", the "className" property is returned.
    • If the given name is "readonly", the "readOnly" property is returned.

    Note: The reason for this behavior is that users frequently confuse attributes and properties. If you need to do something more precise, e.g., refer to an attribute even when a property of the same name exists, then you should evaluate Javascript to obtain the result you desire.

  4. def getCssValueOf(element: WebElement)(propertyName: String): Task[String]

    Gets the value of a given CSS property.

    Gets the value of a given CSS property. Color values should be returned as rgba strings, so, for example if the "background-color" property is set as "green" in the HTML source, the returned value will be "rgba(0, 255, 0, 1)".

    Note that shorthand CSS properties (e.g. background, font, border, border-top, margin, margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned, in accordance with the DOM CSS2 specification - you should directly access the longhand properties (e.g. background-color) to access the desired values.

  5. def getLocationOf(element: WebElement): Task[Point]

    Where on the page is the top left-hand corner of the rendered element.

  6. def getRectOf(element: WebElement): Task[Rectangle]

    Returns the location and size of the rendered element.

  7. def getSizeOf(element: WebElement): Task[Dimension]

    Returns The size of the element on the page.

  8. def getTagNameOf(element: WebElement): Task[String]

    Gets the tag name of this element.

    Gets the tag name of this element. Not the value of the name attribute: will return "input" for the element <input name="foo" />.

  9. def getTextOf(element: WebElement): Task[String]

    Gets the visible (i.e.

    Gets the visible (i.e. not hidden by CSS) text of this element, including sub-elements.

  10. def isDisplayed(element: WebElement): Task[Boolean]

    Returns if this element displayed or not.

    Returns if this element displayed or not. This method avoids the problem of having to parse an element's "style" attribute.

  11. def isEnabled(element: WebElement): Task[Boolean]

    Returns if the element currently enabled or not.

    Returns if the element currently enabled or not. This will generally return true for everything but disabled input elements.

    returns

    True if the element is enabled, false otherwise.

  12. def isSelected(element: WebElement): Task[Boolean]

    Determines whether or not this element is selected or not.

    Determines whether or not this element is selected or not. This operation only applies to input elements such as checkboxes, options in a select and radio buttons. For more information on which elements this method supports, refer to the specification.

  13. def pressEnterOn(element: WebElement): Task[Unit]

    Simulates the key enter into an element.

  14. def sendKeysOn(element: WebElement)(text: CharSequence): Task[Unit]

    Simulates typing into an element, which may set its value.

  15. def submitOn(element: WebElement): Task[Unit]

    If this current element is a form, or an element within a form, then this will be submitted to the remote server.

    If this current element is a form, or an element within a form, then this will be submitted to the remote server. If this causes the current page to change, then this method will block until the new page is loaded.

Inherited from AnyRef

Inherited from Any

Ungrouped