Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Moodle\BehatExtension\Driver\WebDriver Class Reference
Inheritance diagram for Moodle\BehatExtension\Driver\WebDriver:

Public Member Functions

 __construct ( $browsername='chrome', $desiredcapabilities=null, $wdhost='http://localhost:4444/wd/hub', $moodleparameters=[])
 Instantiates the driver.
 
 post_key ($key, $xpath)
 Post key on specified xpath.
 

Static Public Member Functions

static getBrowserName ()
 Returns the browser being used.
 

Static Protected Attributes

static string $browser
 Dirty attribute to get the browser name; $browserName is private.
 

Constructor & Destructor Documentation

◆ __construct()

Moodle\BehatExtension\Driver\WebDriver::__construct ( $browsername = 'chrome',
$desiredcapabilities = null,
$wdhost = 'http://localhost:4444/wd/hub',
$moodleparameters = [] )

Instantiates the driver.

Parameters
string$browsernameBrowser name
array$desiredcapabilitiesThe desired capabilities
string$wdhostThe WebDriver host
array$moodleparametersMoodle parameters including our non-behat-friendly selenium capabilities

Member Function Documentation

◆ getBrowserName()

static Moodle\BehatExtension\Driver\WebDriver::getBrowserName ( )
static

Returns the browser being used.

We need to know it:

  • To show info about the run.
  • In case there are differences between browsers in the steps.
Return values
string

◆ post_key()

Moodle\BehatExtension\Driver\WebDriver::post_key ( $key,
$xpath )

Post key on specified xpath.

Parameters
string$key
string$xpath

The documentation for this class was generated from the following file: