-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
FirefoxDriver Internals
The FirefoxDriver is largely written in the form of a Firefox extension. Language bindings control the driver by connecting over a socket and sending commands (described in the JsonWireProtocol page) in UTF-8. The extension makes use of the XPCOM primitives offered by Firefox in order to do its work. The important thing to notice is that the command names map directly on to methods exposed on the "FirefoxDriver.prototype" in the javascript code.
Firstly, make sure that there's no old version of the FirefoxDriver installed:
- Start firefox's profile manager:
firefox -ProfileManager
- Delete the existing WebDriver profile if there is one. Delete the files too (it's an option that's offered when you delete the profile in the profile manager)
Secondly, take a look at the Mozilla Developer Center, particularly the section to do with setting up an extension development environment. You should now be ready to edit code. It's best to create a test around the area of code that you're working on, and to run this using the SingleTestSuite
. The FirefoxDriver logs errors to Firefox's error console ("Tools->Error Console"), so if a test fails, that's a great place to start looking.
To actually log information to the console, use the "Utils.dumpn()
" method in your javascript code. If you find that you'd like to examine an object in detail, use the "Utils.dump()
" method, which will report which interfaces an object implements, as well as outputting as much information as it can to the console..
The following steps are performed when instantiating an instance of the FirefoxDriver:
- Grab the "locking port" 1.
This wiki is not where you want to be! Visit the Wiki Home for more useful links
Getting Involved
Build Instructions
Releasing Selenium
Updating Chromium DevTools
Ruby Development
Python Bindings
Ruby Bindings
WebDriverJs
This content is being evaluated for where it belongs
Architectural Overview
Automation Atoms
HtmlUnitDriver
Lift Style API
LoadableComponent
Logging
PageFactory
RemoteWebDriver
Xpath In WebDriver
Moved to Official Documentation
Bot Style Tests
Buck
Continuous Integration
Crazy Fun Build
Design Patterns
Desired Capabilities
Developer Tips
Domain Driven Design
Firefox Driver
Firefox Driver Internals
Focus Stealing On Linux
Frequently Asked Questions
Google Summer Of Code
Grid Platforms
History
Internet Explorer Driver
InternetExplorerDriver Internals
Next Steps
PageObjects
RemoteWebDriverServer
Roadmap
Scaling WebDriver
SeIDE Release Notes
Selenium Emulation
Selenium Grid 4
Selenium Help
Shipping Selenium 3
The Team
TLC Meetings
Untrusted SSL Certificates
WebDriver For Mobile Browsers
Writing New Drivers