관련자료
selenium에서 aria-label 선택 하기.
empty1234
2021. 11. 3. 15:49
안녕하세요 오랫만에 리서치 한 내용을 적습니다.
종종 웹사이트 크롤링 할때 iframe으로 감싼 후 popup을 띄어서 선택하는 경우가 있는데요.
이럴 경우 selenium에서는 동적으로 생성되는 코드를 element로 인식 안되기에, click을 할수가 없습니다.
그래서 해당 tag를 find -> select -> javacript run을 통해서 클릭을 해야 됩니다.
이후 , chromedriver.pagesource 를 보게 되면 해당 html은 본문에 추가 되어져 있습니다.
이후 선택할 항목을 찾아서 선택하던지, 링크를 빼오면 됩니다.
해당 글 관련 내용입니다.
감사합니다.
Using aria-label to locate and click an element with Python3 and Selenium
I want to click or more respectively, expand the "Any time" button. I've tried to locate the element by class_name and xpath. The problem is that the class and xpath are the same for all three 'opt...
stackoverflow.com