Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"f.QueryInterface is not a function" for malformed URL in webdriver.Firefox().get() #1248

Closed
HelgaOR opened this issue Nov 13, 2015 · 1 comment

Comments

@HelgaOR
Copy link

HelgaOR commented Nov 13, 2015

I encountered behavior that seems incorrect. When (by accident) I supplied a malformed URL to get() method (in my case, something like "http://localhost:7070somepage" - note that slash is missing), I got very strange exception:

Traceback (most recent call last):
File "script.py", line 230, in
main()
File "script.py", line 209, in main
interface_worker.walk_link_array(base_url, link_array_administration)
File "script.py", line 141, in walk_link_array
self.rm.navigate(base_url + link + params)
File "script.py", line 44, in navigate
self.driver.get(url)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 213, in get
self.execute(Command.GET, {'url': url})
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: f.QueryInterface is not a function
Stacktrace:
at FirefoxDriver.prototype.get (file:///c:/users/vf3861.yug/appdata/local/temp/tmptmjznz/extensions/[email protected]/components/driver-component.js:10523)
at DelayedCommand.prototype.executeInternal_/h (file:///c:/users/vf386
1.yug/appdata/local/temp/tmptmjznz/extensions/[email protected]/components/command-processor.js:12534)
at DelayedCommand.prototype.executeInternal_ (file:///c:/users/vf3861.yug/appdata/local/temp/tmptmjznz/extensions/[email protected]/components/command-processor.js:12539)
at DelayedCommand.prototype.execute/< (file:///c:/users/vf386
1.yug/appdata/local/temp/tmptmjznz/extensions/[email protected]/components/command-processor.js:12481)

It seems this kind of situation needs to be handled differently, to give user more relevant information on the problem (something like "MalformedURLException")

@HelgaOR HelgaOR changed the title "f.QueryInterface is not a function" for malformed URL in Webwriver "f.QueryInterface is not a function" for malformed URL in webdriver.Firefox().get() Nov 13, 2015
@barancev
Copy link
Member

Fixed by commit 10443fc

@lock lock bot locked and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants