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

Selenium Input Step Extension #408

Open
StefanFellinger opened this issue May 20, 2022 · 1 comment
Open

Selenium Input Step Extension #408

StefanFellinger opened this issue May 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@StefanFellinger
Copy link

Consider to split SetInputAction from FindElementAction (maybe others too) and add clear behaviour for input fields.

I'm testing a a table where i need to scroll right so i can input some filter criteria for a column at the end of the table.
I've found that FindElement throws an exception since the input element can not be accessed.

So my workaround is a customized SetInputAction that implements AbstractSeleniumAction:

 new Actions(driver).moveToElement(element).click().perform(); // move to that element
 element.sendKeys(Keys.CONTROL, "a"); // send clear input, so that browser events are published (refresh)
 element.sendKeys(Keys.DELETE);
 element.sendKeys(resolvedValue); // finally send the new input value

The actions are only used to move to that element. I've tried to combine all the steps with the actions but ended up with issues sending the keys.

@christophd
Copy link
Member

So SetInputAction should be able to work on a preselected element, right? How did you find/identify that element then when it is not accessible via findBy selectors?

@christophd christophd added the enhancement New feature or request label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants