T
T
twopizza2016-06-17 17:02:07
PHP
twopizza, 2016-06-17 17:02:07

What is the peculiarity of document parsing by web driver?

I am using Selenium and facebook/php-webdriver.
Team

$messages = $driver->findElement(WebDriverBy::id("messenger"))->findElement(WebDriverBy::className("messenger-channels"))->findElements(WebDriverBy::className("messenger-channel"));

returns the elements I need, and the command
$messages = $driver->findElements(WebDriverBy::className("messenger-channel"));

does not return. The difference is that in the first case, the necessary elements are requested through the parent, and in the second directly. What is the peculiarity of web driver`a and why the second command does not work?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question