Packages

  • package root
    Definition Classes
    root
  • package zinteract
    Definition Classes
    root
  • 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
c

zinteract.element

ZinteractWebElement

implicit class ZinteractWebElement extends AnyRef

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZinteractWebElement
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ZinteractWebElement(element: WebElement)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val clearM: 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.

  6. val clickM: 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.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def findElementM(by: By)(implicit wait: WaitConfig = None): ZIO[Clock, Throwable, WebElement]

    Finds the first WebElement using the given method.

  12. def findElementsM(by: By)(implicit wait: WaitConfig = None): RIO[Clock, List[WebElement]]

    Finds all WebElements using the given method.

  13. def getAttributeM(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.

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def getCssValueM(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.

  16. val getLocationM: Task[Point]

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

  17. val getRectM: Task[Rectangle]

    Returns the location and size of the rendered element.

  18. val getSizeM: Task[Dimension]

    Returns The size of the element on the page.

  19. val getTagNameM: 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" />.

  20. val getTextM: Task[String]

    Get the visible (i.e.

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

  21. def hasElementM(by: By)(implicit wait: WaitConfig = None): RIO[Clock, Boolean]

    Checks if the given method find an element.

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. val isDisplayedM: 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.

  24. val isEnabledM: 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.

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. val isSelectedM: 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.

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. val pressEnterM: Task[Unit]

    Use this method to simulate the key enter into an element.

  31. def sendKeysM(text: CharSequence): Task[Unit]

    Use this method to simulate typing into an element, which may set its value.

  32. val submitM: 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.

  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped