0

In short, I am trying to press the "NEXT" button in this image. Its corresponding HTML is highlighted in the Elements tab on the right. It's a button. However, the entire frame is somehow not searchable easily. I tried pressing it in many ways such as:

driver.find_element_by_css_selector('button.page_btn_font.btnNextNormal.ng-binding').click()

I tried a lot more but nothing worked. So I went to one of the suggested questions when I tried posting this question and tried to list all the buttons in the page. Surprisingly, I only found, and could click, the two buttons in the upper header on the right: Tools and JOHN DOE. In short, I cannot even access the frame below with all the buttons.

I have checked the top of the HTML code and also posted a snippet of it below the main picture. The entire frame is highlighted when I hover over the second div with id='content-container" so I somehow have to get into that. Keep in mind the button itself is 10-15 layers deep into divs so going in order will not be easy if we go that route.

Please see the picture at full zoom.

enter image description here

6
  • Adding the html code as image is bad practice and no one will write that for you. Add the html code as part of post not as image. Pleaase read minimal reproducible example and edit your post accordingly.If the URL of this page is public share that. Commented Sep 28, 2020 at 8:45
  • Is it in an iframe and what site is it? Commented Sep 28, 2020 at 8:48
  • @zack fair Please share url to double check and give solution to this ? Commented Sep 28, 2020 at 11:08
  • @Dev I added the code as a picture in this case because I think the problem is not really in the part I showed. That's the button I want to click. But the problem is bigger than that. it's how to access this frame at all, for which I provided a higher-level view of 5-6 lines at the end. I could post the entire code but it would be a lot. And I'd have to remove whatever personal information there is, which would also take a while. arundeepchohan How do I know it's an iframe? It's an Everfi training module. So not a public link unfortunately. JustinLambert Not public URL :( Commented Sep 29, 2020 at 5:36
  • Do you think I think the problem is not really in the part I showed. That's the button I want to click. But the problem is bigger than that this really makes sense Commented Sep 29, 2020 at 5:43

1 Answer 1

0

Please use the following xpath to click the next button

//button[contains(text(),'Next')]
Sign up to request clarification or add additional context in comments.

2 Comments

This returns an empty variable as I mentioned. This is the key problem. I am not able to access anything inside the frame.
can you sahre url here to check ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.