Learning selenium positioning element, the teacher wrote send_ Key (), but I didn’t click in this method. I kept prompting
selenium Python send_ Key error: list object has no attribute
therefore, both methods can be used to solve the problem.
PS: [0] I don’t know what it means. I’ll come back to understand it when I’m in-depth learning
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
userID = driver.find_elements(By.ID,"kw")[0]
userID.send_keys("123")
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
driver.find_element(By.ID,"kw").send_keys("456")
Read More:
- [Solved] Python Selenium Error: AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_xpath‘
- How to Solve attributeerror: ‘list’ object has no attribute ‘shape‘
- [Python] Right-click Selenium to Save the picture error: attributeerror: solution to module ‘pyscreen’ has no attribute ‘locationonwindow’
- [Solved] AttributeError: ‘Manager‘ object has no attribute ‘get_by_natural_key‘
- [Solved] AttributeError: module ‘selenium.webdriver‘ has no attribute ‘Chrome‘
- [Solved] Python 3.6 Error: ‘dict’ object has no attribute ‘has_key’
- When sending an email, an error was reported: AttributeError:’list’ object has no attribute’encode’
- Python 3.7 Error: AttributeError: ‘str‘ object has no attribute ‘decode‘ [How to Solve]
- How to Solve Python AttributeError: ‘module’ object has no attribute ‘xxx’
- [Modified] AttributeError: ‘socket‘ object has no attribute ‘ioctl‘ python linux
- [Solved] AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_id‘
- How to Solve Python AttributeError: ‘dict’ object has no attribute ‘item’
- [2021-10-05] Python Error: AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [Solved] PyQt: RuntimeError: wrapped C/C++ object has been deleted & has no attribute of flush in python
- [Solved] Python Keras Error: AttributeError: ‘Sequential‘ object has no attribute ‘predict_classes‘
- [Solved] python Error: AttributeError: ‘NoneType‘ object has no attribute ‘split‘
- Python Openyxl Error: AttributeError: ‘int‘ object has no attribute ‘upper‘ [How to Solve]
- Python writes DICOM file (attributeerror: ‘filemetadataset’ object has no attribute ‘transfersyntax uid’ solution)
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [Solved] TUM associate.py Scripte Error: AttributeError: ‘dict_keys‘ object has no attribute ‘remove‘