Skip to content
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

Click() Acting differently to ClickAndHold()/Release() #49

Open
rcocks opened this issue Dec 12, 2013 · 0 comments
Open

Click() Acting differently to ClickAndHold()/Release() #49

rcocks opened this issue Dec 12, 2013 · 0 comments

Comments

@rcocks
Copy link

rcocks commented Dec 12, 2013

I am testing an application where the location of a click within an element matters to the outcome.

My original code was:

$actions->moveToElementWithOffset($element, $offset, 0);
$actions->click();
$actions->perform();

I believed that the click within an action chain should be where the cursor has been moved to through the moveToElementWithOffset. However, the code would always trigger as though there was no offset.

Replacing the code with

$actions->moveToElementWithOffset($element, $offset, 0);
$actions->clickAndHold();
$actions->release();
$actions->perform();

My code now functions correctly, and it is triggering as if clicked at the offset.

So I am curious, is it deliberate that click as part of an action chain does not respect the cursor location? If so, is there a more appropriate action I can use for a single click, or should I stick to using the clickAndHold/release pattern?

My current code under test is not open source but if required I will try to mock up a demonstration of this.

I am using Iceweasel 17 and webdriver 2.37.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant