I’m getting an “invalid locator” error from the selenium webdriver when running tests on Edge Chromium.
I’m using the python webdriver, the browser opens fine and goes to a page, just using google.co.uk to test.
The test works when using the XPath to find the search bar, but when I try to use the element name ‘q’, the test fails and gives me this:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid locator
Edge version: 80.0.361.66
With relevant msedgedriver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
selenium version 4.0.0a3
This method works:
.find_element_by_xpath(self.query_field_name)
This method does not work:
.find_element_by_name(‘q’)
The same method works fine when I choose to run on Chrome. Is this a known issue with the new Edge browser?
Thanks.