//How webdriver sends commands to Firefox
--------------------------------
1)Webdriver creates a map/dictionary(based on programming language) with
context : String, opaque key by client language(Redundant)
commandName : The name of the command to execute
parameters : A list of parameters, The typoe depends on the command, This can be empty
elementId : String and an opaquekey that represents the identifier for a particular element
2)Serialize the map using JSON
3)Connect to the socket opened by the Firefox
4)Send the JSON across wire to Firefox
5)It will be Block until the response is sent
//Firefox executes the command
------------------------------
6)Once the command has reached the Firefox, it is deserialized from JSON to Javascript Object
7)The command name is interpreted
8)Some commands don't pay attention to context, for some that do, context is interpreted as window or frame.
9)In order to execute the command, it is looked up in FirefoxDriver prototype.
eg :
String url = "http://google.com"
driver.get(url);
is same as
FirefoxDriver.prototype.get = function(respond, url)
Each function takes at least one parameter: the object that represents the response
FirefoxDriver.prototype.getCurrentUrl = function(respond) {
respond.context = this.context;
respond.response = Utils.getBrowser(this.context).contentWindow.location;
respond.send();
}
10) Calling the "send" method causes the response to be sent via the socket connection back to the client
//Webdiver reads the response
------------------------------
11)The response is another map serialzed in JSON,
methodName : String, Should match "commandName" from the original command sent
context : same as what was sent
isError : Indicated some error has occured(In java this will cause the exception)
responseText A string who's meaning differs depending on the command.
12)If "isError" is true, this will be a description of the error that actually occurred.
Handle Race Condition in Alerts with Webdriver
A beta features wihich makes Firefox Faster
How FirefoxDriver opens Firefox Browser
Enable Firebug in Session started by FirefoxDriver
How FirefoxDriver Executes the Selenium Commands
--------------------------------
1)Webdriver creates a map/dictionary(based on programming language) with
context : String, opaque key by client language(Redundant)
commandName : The name of the command to execute
parameters : A list of parameters, The typoe depends on the command, This can be empty
elementId : String and an opaquekey that represents the identifier for a particular element
2)Serialize the map using JSON
3)Connect to the socket opened by the Firefox
4)Send the JSON across wire to Firefox
5)It will be Block until the response is sent
//Firefox executes the command
------------------------------
6)Once the command has reached the Firefox, it is deserialized from JSON to Javascript Object
7)The command name is interpreted
8)Some commands don't pay attention to context, for some that do, context is interpreted as window or frame.
9)In order to execute the command, it is looked up in FirefoxDriver prototype.
eg :
String url = "http://google.com"
driver.get(url);
is same as
FirefoxDriver.prototype.get = function(respond, url)
Each function takes at least one parameter: the object that represents the response
FirefoxDriver.prototype.getCurrentUrl = function(respond) {
respond.context = this.context;
respond.response = Utils.getBrowser(this.context).contentWindow.location;
respond.send();
}
10) Calling the "send" method causes the response to be sent via the socket connection back to the client
//Webdiver reads the response
------------------------------
11)The response is another map serialzed in JSON,
methodName : String, Should match "commandName" from the original command sent
context : same as what was sent
isError : Indicated some error has occured(In java this will cause the exception)
responseText A string who's meaning differs depending on the command.
12)If "isError" is true, this will be a description of the error that actually occurred.
Handle Race Condition in Alerts with Webdriver
A beta features wihich makes Firefox Faster
How FirefoxDriver opens Firefox Browser
Enable Firebug in Session started by FirefoxDriver
How FirefoxDriver Executes the Selenium Commands
No comments:
Post a Comment