catcher_modules.frontend package


catcher_modules.frontend.selenium module

class catcher_modules.frontend.selenium.Selenium(**kwargs)[source]

Bases: catcher.steps.external_step.ExternalStep

This complex step consists of two parts. First - you need to create a Selenium script and put it in the Catcher’s resources directory. Second - run the step in Catcher.

Catcher variables can be accessed from Selenium script via environment variables. All output from Selenium script is routed to Catcher OUTPUT variable.

If you specify java/kotlin source file as a Selenium script - Catcher will try to compile it using system’s compiler

  • driver: path to the driver executable. Optional. If not specified - will try to use PATH variable.
  • file: path to your file with the test
  • libraries: path to selenium client libraries. Optional. Used for sources compilation (f.e. .java -> .class). Default is /usr/lib/java/*

Run selenium python

- selenium:
        driver: '/opt/bin/geckodriver'
        file: ''

Compile and run java selenium ( should be in resource dir, selenium cliend libraries should be in /usr/share/java/)

- selenium:
        driver: '/usr/lib/geckodriver'
        libraries: '/usr/share/java/*'

Python, JavaScript and Jar archives with selenium tests can be stored in any directory, while Java and Kotlin source files must be stored in resources only, as they need to be compiled first.