-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use interfaces as much as possible; switch to actions convenience class #59
base: main
Are you sure you want to change the base?
Conversation
uuf6429
commented
Jan 4, 2025
•
edited
Loading
edited
-
⚠️ Must be rebased on main after Upgrade phpstan; increase phpstan level; fix a few bugs #55 is merged.
❌ 2 Tests Failed:
View the top 1 failed tests by shortest run time
View the full list of 1 ❄️ flaky tests
To view more test analytics, go to the Test Analytics Dashboard |
{ | ||
$element->getLocationOnScreenOnceScrolledIntoView(); | ||
$this->getWebDriver()->getMouse()->mouseMove($element->getCoordinates()); | ||
$element->click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to be consistent with the other actions by using this:
$this->actions()->click($element)->perform();
but for some strange reason, it does not work well in firefox, failing many tests:
https://github.com/minkphp/webdriver-classic-driver/actions/runs/12611297356/job/35146807053
I thought it might be because of the geckdriver-specific fix in RemoteWebElement->click()
, but it does not seem to be the case.
My last remaining guess is that DriverCommand::CLICK_ELEMENT
also waits for the page to finish loading, whereas DriverCommand::ACTIONS
(W3C)/DriverCommand::CLICK
(JWP) do not wait.
It may be useful to figure out exactly why, it might be the reason behind various fragile tests we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to guess. Just do real-time debugging inside a WebDriver code (if you can reproduce a problem locally).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens within selenium (and possibly the webbrowser). DriverCommand::CLICK_ELEMENT
and DriverCommand::ACTIONS
(W3C)/DriverCommand::CLICK
(JWP) produce a different request to selenium. Of course I'll dig deeper..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase this PR ?
5be7ce6
to
75eac8b
Compare
@@ -18,14 +18,18 @@ | |||
use Facebook\WebDriver\Exception\TimeoutException; | |||
use Facebook\WebDriver\Exception\UnsupportedOperationException; | |||
use Facebook\WebDriver\Exception\WebDriverException; | |||
use Facebook\WebDriver\Interactions\WebDriverActions; | |||
use Facebook\WebDriver\Internal\WebDriverLocatable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Internal
namespace suggests, that this class/interface shouldn't be used outside of the library and therefore not included in BC promise. But maybe I'm mistaken.