Troubleshooting of selenium errors
Jump to navigation Jump to search
- 1 How to tracking the selenium errors
- 2 How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException
- 3 How to resolve [WARNING]: This version of ChromeDriver only supports Chrome version xx or [WARNING]: This version of ChromeDriver has not been tested with Chrome version 86
- 4 References
How to tracking the selenium errors
- Checking the standalone selenium server is running or not Linux on
- Checking the log file of standalone selenium server e.g. launching the server by the command . The log file was located at
- (optional) Checking the port where the selenium server is running e.g.
- Checking the error log file of HTTP server e.g.
- (optional) Checking the error log file of PHP-FPM e.g. which its file path defined in the configuration file
How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException
PHP Fatal error: Uncaught Facebook\WebDriver\Exception\InvalidSelectorException: invalid selector: The result of the xpath expression "xxx" is: [object Attr]. It should be an element. (Session info: chrome=83.0.4103.61) in /path/to/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:105
- After the term was keyed in into the text box, the script shuld auto click the specified button which specified by XPath expression.
How to resolve [WARNING]: This version of ChromeDriver only supports Chrome version xx or [WARNING]: This version of ChromeDriver has not been tested with Chrome version 86
- Download the same version of ChromeDriver with the version installed on the computer or server
- You may need to stop the ChromeDriver in the process list if you could not overwrite the existing ChromeDriver file
- Overwrite the existing ChromeDriver file