-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Currently, we have our own Driver class that wraps many selenium-webdriver methods that we use in our e2e tests. metamask-extension/test/e2e/webdriver/driver.js
This instances of this class form all the drivers that are used in all of our e2e tests. So anywhere that there is a driver.method() call in our e2e tests, we are calling methods defined in the Driver class or available on that classes objects by virtue of being defined on the WebDriver instance passed to that class. However, we still do import some methods and objects from the selenium-webdriver module.
We need to abstract all methods that we use from selenium-webdriver in an API which ultimately can be decoupled from the driver / e2e test library that backs it.
The goal here is to make it easy to replace seleniuem-webdriver with something else, e.g. playwright.
To complete this task we need to:
- ensure that our driver class has equivalents for all methods from selenium-webdriver (note that, to start, all of these methods will just be wrappers around webdriver)
- double check that these methods can be properly supported by Playwright, which is the top candidate for what we will replace selenium-webdriver with. In particular, the
Byanduntilmethods and patterns may require more sophisticated abstractions to create an api that can support selenium-webdriver and its playwright equivalent. - refactor all our current tests to fully use the methods defined in this api