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

Element.clear() doesn't work on React elements #6863

Closed
jklingen92 opened this issue Jan 17, 2019 · 2 comments
Closed

Element.clear() doesn't work on React elements #6863

jklingen92 opened this issue Jan 17, 2019 · 2 comments

Comments

@jklingen92
Copy link
Contributor

jklingen92 commented Jan 17, 2019

🐛 Bug Report

The WebElement clear() command doesn't work on certain inputs.

I believe it is related to React Components.

To Reproduce

Run the following script

from selenium import webdriver
from time import sleep


driver = webdriver.Chrome() #Can be Firefox as well
driver.get('https://reactjs.org/')

name_field = driver.find_element_by_id("algolia-doc-search")
print(name_field.get_property('value'))

name_field.send_keys('hello')
print(name_field.get_property('value'))

sleep(1)

name_field.clear()
print(name_field.get_property('value'))

driver.close()

Run the script. It will type 'hello' into the search bar, pause, and then send the clear command. The search bar will remain filled.

Expected behavior

clear() should empty the search bar.

Test script or set of commands reproducing this issue

python tmp.py

Issues without a reproduction script are likely to stall and eventually be closed.

Environment

OS: Linux pop-os 4.18.0-13-generic
Browser: Chrome
Browser version: 71.0.3578.98 (64-bit)
Browser Driver version: ChromeDriver 2.45
Language Bindings version: Python 3.141.0

-- or --

OS: Linux pop-os 4.18.0-13-generic
Browser: Firefox
Browser version: 64.0
Browser Driver version: GeckoDriver 0.23.0
Language Bindings version: Python 3.141.0

@ckzgraphics
Copy link

You may review this one- 6741

@p0deje
Copy link
Member

p0deje commented Jan 23, 2019

Duplicate of #6741

@p0deje p0deje marked this as a duplicate of #6741 Jan 23, 2019
@p0deje p0deje closed this as completed Jan 23, 2019
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants