Hi, everyone. An error appears when trying to turn as shown below. Is it not possible to print certain strings after append through repetitive statements?
items = driver.find_element(By.CLASS_NAME, 'items').text
items_split = items.split("/")
item_list = []
for item in items_split:
item_list.append(item.text)
print(item_list)
AttributeError: 'str' object has no attribute 'text'
AttributeError: 'str' object has no attribute 'text'
Str object does not have a text element. This is a problem caused by trying to replace the data that has already been replaced by str with a text command with str once again.
items = driver.find_element(By.CLASS_NAME, 'items').text
items_split = items.split("/")
item_list = []
for item in items_split:
item_list.append(item)#(item.text)
print(item_list)
© 2024 OneMinuteCode. All rights reserved.