boa-constrictor
boa-constrictor copied to clipboard
[FEATURE]: New Task: shift+click, or more general keypress+click
Description
I would like a new WebDriver Task for holding a key (or keys) and clicking. With Key
in the constructor, the method could be something like as follows:
/// <summary>
/// Clicks the web element while holding the specified Key.
/// Use browser actions instead of direct click (due to IE).
/// </summary>
/// <param name="actor">The screenplay actor.</param>
/// <param name="driver">The WebDriver.</param>
public override void PerformAs(IActor actor, IWebDriver driver)
{
actor.WaitsUntil(Existence.Of(Locator), IsEqualTo.True());
new Actions(driver).MoveToElement(driver.FindElement(Locator.Query)).KeyDown(Key).Click().KeyUp(Key).Perform();
}
Alternatives
No response
Anything else?
I'd be happy to setup the pr--please let me know if I should proceed--or let somebody else do it.
We are needing shift+click for testing one function of https://github.com/sillsdev/TheCombine.
Commitments
- [X] I agree to follow Boa Constrictor's Code of Conduct.
- [X] I want to work on this issue myself.
@imnasnainaec , this sounds awesome! I assigned it to you. Here's our contributing guide: https://q2ebanking.github.io/boa-constrictor/contributing/contributing-code/
Maybe this more abstractly could be an action like Modifier Click and similarly Modifier Chord
Hi @imnasnainaec! Is this something you'd still like to implement?
@AutomationPanda It is, though my work schedule has been changing and I don't expect to be able to work on it until next spring or summer.