This page is full of choice, each page shows ten questions, then here is a button on the next page, click the next page 10 problems,
I only know that these questions are in a web page, click the next page and no page jump, view the HTML source code can also see all on one page, because don't know HTML related content, not clear detail,
According to my rough knowledge of HTML, I only know that these questions along with the next page button is wrapped in an input tag, so I directly using selenium positioning input element, and then click, now my program can automatically answer to the first page of the 10 problem, then can also click on the button on the next page, when appeared the next page, don't move, python display element not interactable.
According to the truth of these elements are all within a web page, why can't operate? Pray god to give a solution.
CodePudding user response:
To use debugging in chrome's console, could hide inside the iframe, first in the console can pass js, click on the button control to the next page, consider the realization of seleniumCodePudding user response:
So is frame, so is a window, pay attention to cut cut outCodePudding user response:
Elder brother is not very good, so please help to look at, I cut a few pictures of consoleFirst of all, you can see there are three pages, page0 to page2, below the red part is three pages of the title tag
Then click open a div to see the inside of the topic structure, I cut the page1 figure, you can see there is 11-20:
Then click open a topic, you can see title structure:
Because found every radio option in the input element, I'm positioning to the input element, and then click,
And then the next page button is also in the input, screenshot below
Finished click the next page will appear next question, but my application is not moved, how to operate the element to the next page?