package
0.79.0
Repository: https://github.com/viant/endly.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

webdriver Runner

webdriver runner opens a web session to run a various action on web driver or web elements.

Service IdActionDescriptionRequestResponse
webdriverstartstart standalone webdriver serverServerStartRequestServerStartResponse
webdriverstopstop standalone webdriver serverServerStopRequestServerStopResponse
webdriveropenopen a new browser with session id for further testingOpenSessionRequestOpenSessionResponse
webdrivercloseclose browser sessionCloseSessionRequestCloseSessionResponse
webdrivercall-drivercall a method on web driver, i.e wb.GET(url)WebDriverCallRequestServiceCallResponse
webdrivercall-elementcall a method on a web element, i.e. we.Click()WebElementCallRequestWebElementCallResponse
webdriverrunrun set of action on a pageRunRequestRunResponse

call-driver and call-element actions's method and parameters are proxied to stand along webdriver server via webdriver client

See webdriver selector for more details on how to use xpath, css, id, name, class, tag, link, partial link, dom, and xpath selectors.

webdriver run request defines sequence of action/commands. In case a selector is not specified, call method's caller is a WebDriver, otherwise WebElement defined by selector. Wait provides ability to wait either some time amount or for certain condition to take place, with regexp to extract data

Run request provide commands expression for easy webdriver interaction:

Command syntax:

  [RESULT_KEY=] [(WEB_ELEMENT_SELECTOR).]METHOD_NAME(PARAMETERS)
  
  i.e:
  (#name).sendKeys('dummy 123')
  (xpath://SELECT[@id='typeId']/option[text()='type1']).click()
  get(http://127.0.0.1:8080/form.html)
  

Time wait

    - command: CurrentURL = CurrentURL()
    exit: $CurrentURL:/dummy/
    sleepTimeMs: 1000
    repeat: 10

Inline pipeline tasks

endly -r=test

@test.yaml

defaults:
  target:
     URL: ssh://127.0.0.1/
     credentials: localhost
pipeline:
  init:
    action: webdriver:start
  test:
    action: webdriver:run
    remotewebdriver:
      URL: http://127.0.0.1:8085
    commands:
      - get(http://play.golang.org/?simple=1)
      - (#code).clear
      - (#code).sendKeys(package main

          import "fmt"

          func main() {
              fmt.Println("Hello Endly!")
          }
        )
      - (#run).click
      - command: output = (#output).text
        exit: $output.Text:/Endly/
        sleepTimeMs: 1000
        repeat: 10
      - close
    expect:
      output:
        Text: /Hello Endly!/