Difference between revisions of "Troubleshooting of selenium errors"

From LemonWiki共筆
Jump to navigation Jump to search
(Created page with "[https://www.selenium.dev/ SeleniumHQ Browser Automation] == How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException == Error message <pre> PHP Fatal er...")
 
m
 
Line 1: Line 1:
[https://www.selenium.dev/ SeleniumHQ Browser Automation]
+
[https://www.selenium.dev/ SeleniumHQ Browser Automation] ([https://github.com/php-webdriver/php-webdriver php-webdriver/php-webdriver: PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver])
  
 
== How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException ==
 
== How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException ==

Latest revision as of 15:58, 26 May 2020

SeleniumHQ Browser Automation (php-webdriver/php-webdriver: PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver)

How to resolve Uncaught Facebook\WebDriver\Exception\InvalidSelectorException[edit]

Error message

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

Situation

  • After the term was keyed in into the text box, the script shuld auto click the specified button which specified by XPath expression.

Possibile soultions

  • Solution1: Using headless chrome[1]
  • Solution2: Not click the button which specified by XPath expression. Send the ENTER to submit the form[2].

References[edit]


Troubleshooting of ...

Template