Click the "More" button on the page, and click
I want to display an item.
<span>See more faculties, departments and courses</span>
I examined the following code, but the button itself does not disappear, so
Clicking and opening/closing in the same place will be repeated endlessly.
while True: try: elem = driver.find_element_by_class_name ('__ shi_m_btn_more') elem.click () except NoSuchElementException: break
I tried to think that it would be possible to respond with the for sentence that you advised.
# We confirmed that you can click the first corresponding element below. elem = driver.find_element_by_class_name ('__ shi_m_btn_more') elem.click () # #There are four such elements in the page. elems = driver.find_elements_by_class_name ('__ shi_m_btn_more') len (elems) Four #I want to click on four elements that exist on the page for elem in elems: elem.click () # Error occurred ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (600, 696). Other element would receive the click: ... (Session info: chrome = 78.0.3904.97)
I would be grateful if you could give me any advice on how to solve it.
Thanks for your cooperation.
Answer # 1
elems = driver.find_elements_by_class_name ('__ shi_m_btn_more') for elem in elems: ~~~
Let's examine what changes will occur on the DOM by pressing the
Answer # 2
button that you can go now.
If you know that, if you confirm in the code that the change has occurred, you should get the next element, and then click again when you have finished.
Answer # 3
I think you can see that this is the last page.
Let's check it.
- python - [selenium] i want to click the dropdown, but an error is returned
- python - [selenium] click the radio button
- [python] i want to take a screenshot of the entire page with selenium (scrolling but the bottom of the page is cut off)
- python - i want to display data scraped by selenium in a table using a for statement in a django template
- in python selenium, i want to get the element of the button of the site from class name, but it fails with nosuchelementexceptio
- python - the bet365 site cannot be scraped with selenium if you are familiar with it, could you please tell me?
- data scraped by selenium using python cannot be stored in the list just by the for statement
- python - oserror: [errno 22] corrective action for invalid argument
- python - [selenium] about element specification in find_element_by_css_selector
- python - how to iterate an action using a for statement
- python - ec2 selenium garbled characters
- [python] selenium i want to operate the window that appears by clicking
- python 3x - [python] [selenium] i get an error when i put a variable in find_element_by_xpath
- python - selenium: element specification an error occurs in the code that can be executed once
- i want to click and number a few images like a switch in python
- python - open another tab of selenium
- python selenium data extraction error
- python - how to get "job description" of hello work with selenium
- [python] i can't open a new firefox tab in selenium a new window will open
- python 3x - button execution action in tkinter when executing code
- python 3x - i can't get the text of the span tag using selenium
- the client certificate is not reflected when executing the automatic script in the environment of "selenium × firefox × pyt
- chrome - i want to operate chromium with selenium
- i want to save pdf with name with python selenium
- python - cannot execute selenium on web (cgi)
- python 3x - python, selenium, radio button cannot be selected
- i want to write a number guessing program that uses endless loop using break in python
- i want to upload a csv file at jupyter labo
- python 3x - i want to open the csv file downloaded with selenium web driver with pandas
- python 3x - i want to stop the browser that is already running on selenium