Clear vs ClearInput
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start by reviewing the existing Clear action and the Selenium clear behavior described in the issue. Define the supported input cases and verify that the proposed action removes both displayed text and the underlying value, including for MUI components.
Written by the indexing model from the issue text.
Description
While testing MUI components I noticed that a simple element.clear() isn't sufficient to clear out text input fields. I came across a reference to comments in selenium source code explaining exactly what clear() does and doesn't do.
/** If this element is a text entry element, this will clear the value. Has no effect on other elements. Text entry elements are INPUT and TEXTAREA elements. Note that the events fired by this event may not be as you'd expect. In particular, we don't fire any keyboard or mouse events. If you want to ensure keyboard events are fired, consider using something like {@link #sendKeys(CharSequence...)} with the backspace key. To ensure you get a change event, consider following with a call to {@link #sendKeys(CharSequence...)} with the tab key. */
While it does remove the TEXT of a the input element, it will not remove the VALUE from the element. For MUI components this renders element.clear() nearly useless since any followup interaction with the field will often lead to the value being pushed to the text input again.
I'd like to propose a new action that is more universal (if that's even a possibility) than our current Clear(). Something that will handle removing the input along with value.
- Dominant language
- Python
- Stars
- 7
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ScreenPyHQ/screenpy_selenium
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
ScreenPyHQ/screenpy_selenium#65 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
ScreenPyHQ/screenpy_selenium#63 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in ScreenPyHQ/screenpy_selenium
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100