Skip to content

Latest commit

 

History

History

webdriver

webdriver Runner

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

Service Id Action Description Request Response
webdriver start start standalone webdriver server ServerStartRequest ServerStartResponse
webdriver stop stop standalone webdriver server ServerStopRequest ServerStopResponse
webdriver open open a new browser with session id for further testing OpenSessionRequest OpenSessionResponse
webdriver close close browser session CloseSessionRequest CloseSessionResponse
webdriver call-driver call a method on web driver, i.e wb.GET(url) WebDriverCallRequest ServiceCallResponse
webdriver call-element call a method on a web element, i.e. we.Click() WebElementCallRequest WebElementCallResponse
webdriver run run set of action on a page RunRequest RunResponse

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!/