Tools to Capture and Convert the Web
GrabzIt's Online Community

Python API CSS Selector to click a button.

Ask questions on how to capture or convert web pages or HTML into images, CSV, PDF or DOCX documents as well on how to convert videos into animated GIF's using our API.

Apologies as I am not an experienced coder yet.

I am using the Python API to render web pages to HTML.

I need to click on an Accept button.

The code in the web page is <button id="onetrust-accept-btn-handler">Accept</button>

The option to click the button should be this? options.clickElement = "#onetrust-accept-btn-handler"

I believe I am missing something.

I would appreciate any guidance!

 

Asked by Stephen Komos on the 26th of September 2023

Yes, that's correct you may need a delay to view the effects of the click.

Answered by GrabzIt Support on the 26th of September 2023

This was an issue with our capture software. That has now been fixed. Sorry for any inconvenience caused.

Answered by GrabzIt Support on the 26th of September 2023