편집 기록

편집 기록
  • 프로필 nowp님의 편집
    날짜2022.01.19

    파이썬 질문입니다! AttributeError: 'str' object has no attribute 'text'


    안녕하세요. 아래와 같이 돌리는 데 에러가 뜹니다. 특정 문자열들을 반복문을 통해 append 후 출력이 안되는 걸까요?

                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'
    
  • 프로필 남선주님의 편집
    날짜2022.01.19

    코린이 질문입니다! 파이썬 질문


    안녕하세요., 아래와 같이 돌리는 데 에러가 뜹니다. 특정 문자열들을 반복문을 통해 append 후 출력이 안되는 걸까요? <코드> 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'