Skip to content

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

Closed
@HelgaOR

Description

@HelgaOR

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions