0

Python -

import selenium from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from random_word import RandomWords import time import names TimeStr = '60' Dri = webdriver.Chrome() Dri.get('WebsiteUrlHere') time.sleep(22) TimeLimmit = Dri.find_elements_by_id('time') TimeLimmit.send_keys(TimeStr) ERROR -> Traceback (most recent call last): File "C:\Users\925ra\Desktop\GoogleTest.py", line 36, in <module> TimeLimmit.send_keys(TimeStr) AttributeError: 'list' object has no attribute 'send_keys'

12th Dec 2018, 6:56 PM
MyMomAteMyCat123
MyMomAteMyCat123 - avatar
2 Respostas
+ 2
You should save your code in Code Playground and link to it instead of posting it here again after every change. That would also make it easier for people to click, play around with it and consequently help you.
12th Dec 2018, 7:12 PM
HonFu
HonFu - avatar
+ 1
HonFu Sometimes it doesn't work here in the Playground because of missing modules. selenium isn't available ;) MyMomAteMyCat123 I don't know what happens here, but the error message tells that TimeLimmit is a list, so you can't call the attribute "send_keys". So have a closer look of how this variable is structured.
12th Dec 2018, 7:26 PM
Matthias
Matthias - avatar