We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bde8d5 commit 9ab1af4Copy full SHA for 9ab1af4
tests/functional/BaseTest.php
@@ -38,4 +38,12 @@ public function testGetById() {
38
$this->driver->findElement(WebDriverBy::id('id_test'))->getText()
39
);
40
}
41
+
42
+ public function testGetByClassName() {
43
+ $this->driver->get($this->getTestPath('index.html'));
44
+ self::assertEquals(
45
+ 'Test by Class',
46
+ $this->driver->findElement(WebDriverBy::className('test_class'))->getText()
47
+ );
48
+ }
49
tests/functional/html/index.html
@@ -5,5 +5,6 @@
5
<body>
6
<h1 id='welcome'>Welcome to the facebook/php-webdriver testing page.</h1>
7
<p id="id_test">Test by ID</p>
8
+ <p class="test_class">Test by Class</p>
9
</body>
10
</html>
0 commit comments