There is a class with the class name list-item.tier-01.champ-item
(green)
Kids with 1 tier are list-item.tier-01...I
Children with two tiers are listed-item.tier-02...It looks like this.
I want to bring up the text of the element whose tag is p among the classes with 1 tier How do I do it?
Ex) > Darius
Fiora
Jays
The current element value is loaded, but it cannot be converted to text.
champ_tier = driver.find_elements(By.CLASS_NAME, 'list-item.tier-01.champ-item')
champ_names = []
for i in champ_tier:
champ_name = i.find_elements(By.TAG_NAME, 'p')
champ_names.append(champ_name)
print(champ_names)
This is usually how it should be.
champ_names.append(champ_name.text)
© 2024 OneMinuteCode. All rights reserved.