Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the Firefox class.
 /// </summary>
 /// <param name="application"> The window of the existing browser. </param>
 private Firefox(Application application)
     : base(application)
 {
     _consoleActor           = string.Empty;
     _jsonSerializerSettings = new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     };
     _messageBuffer = new FirefoxBuffer();
     _responses     = new List <dynamic>();
     _socketBuffer  = new byte[FirefoxBuffer.InitialSize];
 }
 /// <summary>
 /// Initializes a new instance of the Browser class.
 /// </summary>
 /// <param name="hostname">The hostname of the Firefox browser.</param>
 /// <param name="port">The remote debugger port to connect to.</param>
 /// <param name="timeout"></param>
 public FirefoxBrowserConnector(string hostname, int port, TimeSpan timeout)
 {
     _hostname = hostname;
     _jsonSerializerSettings = new JsonSerializerSettings {
         ContractResolver = new CamelCasePropertyNamesContractResolver()
     };
     _port          = port;
     _timeout       = timeout;
     _consoleActor  = string.Empty;
     _messageBuffer = new FirefoxBuffer();
     _socketBuffer  = new byte[FirefoxBuffer.InitialSize];
     _tabActor      = string.Empty;
     Responses      = new List <dynamic>();
 }