Answer the question
In order to leave comments, you need to log in
Why does Selenium output /session//element///text when getting the text of an element?
The same goes for getting attributes.
<?php
namespace Facebook\WebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
require_once('/var/www/sites/eat_catalog/php/vendor/autoload.php');
$host = 'http://localhost:4444/';
$capabilities = DesiredCapabilities::firefox();
$driver = RemoteWebDriver::create($host, $capabilities);
$driver->get('http://google.com');
$title = $driver->findElement(WebDriverBy::id('sign-in'))->getAttribute('title');
$inputElement = $driver->findElement(WebDriverBy::id('username'));
echo $value;
$driver->quit();
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question