Skip to content

Commit

Permalink
Dev: Add two helper methods in web driver
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 4, 2019
1 parent 33bb396 commit 68214bb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/LimeSurveyWebDriver.php
Expand Up @@ -115,4 +115,22 @@ public function dumpBody()
$body = $this->findElement(WebDriverBy::tagName('body'));
var_dump('body text = ' . $body->getText());
}

/**
* @param string $id
* @return Element
*/
public function findById($id)
{
return $this->findElement(WebDriverBy::id($id));
}

/**
* @param string $css
* @return ElementCollection
*/
public function findByCss($css)
{
return $this->findElement(WebDriverBy::cssSelector($css));
}
}

0 comments on commit 68214bb

Please sign in to comment.