-
Notifications
You must be signed in to change notification settings - Fork 39
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
Implement BrowserType.connect
#800
Commits on Mar 2, 2023
-
Remove storage.Dir property from BrowserType
Removes the data dir property from BrowserType as it's unnecessary as a property for the struct, instead we can define it when launching the browser. This will allows the possibility of having two different implementations of storage.Dir, one local and one remote.
Configuration menu - View commit details
-
Copy full SHA for 2900f70 - Browse repository at this point
Copy the full SHA 2900f70View commit details -
Add BrowserProcessMeta abstraction
Adds a new component BrowserProcessMeta in order to abstract the handling of the browser process handle and the browser data directory. This is defined as an interface that will support implementations for a local browser process and for a remote browser process and therefore minimizing changes in the rest of the implementation, as well as protecting the process and data dir properties from possible NPE errors.
Configuration menu - View commit details
-
Copy full SHA for 5e9b761 - Browse repository at this point
Copy the full SHA 5e9b761View commit details -
Modify BrowserProcess to use LocalBrowserProcessMeta
Modify BrowserProcess to use the BrowserProcessMeta abstraction. With the current implementation only LocalBrowserProcessMeta applies as right now the browser to connect to is always launched from our implementation.
Configuration menu - View commit details
-
Copy full SHA for dd2c1fa - Browse repository at this point
Copy the full SHA dd2c1faView commit details -
Avoid call to BrowserProcess meta from Browser
This commit provides an abstraction for BrowserProcess cleanup and modifies Browser implementation in order to use it and in this way avoids reaching the internal BrowserProcess property 'meta' from it.
Configuration menu - View commit details
-
Copy full SHA for 39e62b9 - Browse repository at this point
Copy the full SHA 39e62b9View commit details -
Fix BrowserType.Connect method signature
Fixes the BrowserType.Connect method signature in order to receive as input the WS URL to connect to, and return a Browser instance.
Configuration menu - View commit details
-
Copy full SHA for b0d75fd - Browse repository at this point
Copy the full SHA b0d75fdView commit details -
Removes the logger instance held by BrowserType as it's unnecessary. Instead a local logger is created and passed along during the launch process. Also removes the unnecessary BrowserProcess.AttachLogger method as the logger was already passed to the constructor and could be set from there. This will allow to not tight the loggers used for BrowserType.Launch and BrowserType.Connect methods.
Configuration menu - View commit details
-
Copy full SHA for 383f254 - Browse repository at this point
Copy the full SHA 383f254View commit details -
Refactor browser options to use constants
Defines possible browser launch options as constants instead of string literals. This will be useful when adding additional parsing methods to handle the differences for BrowserType launch and connect methods.
Configuration menu - View commit details
-
Copy full SHA for f87fd5f - Browse repository at this point
Copy the full SHA f87fd5fView commit details -
Add support for remote browser options
Modifies browser options in order to support parsing for options when the browser is indicated to be in a remote machine.
Configuration menu - View commit details
-
Copy full SHA for aa84874 - Browse repository at this point
Copy the full SHA aa84874View commit details -
Rename NewBrowserProcess to NewLocalBrowserProcess
This allows to differentiate the constructor for a local browser process and a remote browser process.
Configuration menu - View commit details
-
Copy full SHA for 9aafb17 - Browse repository at this point
Copy the full SHA 9aafb17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1815afd - Browse repository at this point
Copy the full SHA 1815afdView commit details -
Refactor browser process constructors
Extract common code for browser process termination handling in its own function.
Configuration menu - View commit details
-
Copy full SHA for 8f42ed6 - Browse repository at this point
Copy the full SHA 8f42ed6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a77bf3a - Browse repository at this point
Copy the full SHA a77bf3aView commit details -
Refactor, move ExecutablePath method
This is for readability purposes, so launch and connect implementations are together, as they share common behaviors.
Configuration menu - View commit details
-
Copy full SHA for c60ad61 - Browse repository at this point
Copy the full SHA c60ad61View commit details -
Refactor BrowserType Launch and Connect
Refactos Launch and Connect methods in order to extract common implementation parts (mainly initialization procedures) into a single function, reduce code repetition and simplify the main methods flow.
Configuration menu - View commit details
-
Copy full SHA for 2b1a852 - Browse repository at this point
Copy the full SHA 2b1a852View commit details -
Also adds a new method in common.Browser API so we can get the underlying browser process WS URL. This is required in order to reuse the current TestBrowser implementation to launch a new browser and connecto to it through BrowserType.Connect.
Configuration menu - View commit details
-
Copy full SHA for eb32d01 - Browse repository at this point
Copy the full SHA eb32d01View commit details -
Refactor cloud and remote browser flags
Removes the cloud flag as it's overlapped by the remote flag. Resolves: #800 (comment)
Configuration menu - View commit details
-
Copy full SHA for 21253ab - Browse repository at this point
Copy the full SHA 21253abView commit details -
Avoid closing browser when executed remotely
Modifies the Browser.Close implementation in order to avoid sending the Close CDP cmd when the browser is being executed remotely.
Configuration menu - View commit details
-
Copy full SHA for 1bbf855 - Browse repository at this point
Copy the full SHA 1bbf855View commit details