So I'm testing a bot I've created using Python with Selenium on the Amazon website.
When the bot opens the browser on the Amazon product page, I'm greeted with a "Select Your Cookies Preference" slide-up pop-up at the bottom of my window.
I can use my Selenium bot to click the "Accept Cookies" button and then click the "Add to Cart" button, which I coded without any issues - but my question is, can I bypass clicking the "Accept Cookies" button and go straight to clicking the "Add to Cart" button behind this Cookies slide-up pop-up?
I know I can click on "Add to Cart" without hitting "Accept Cookies" when I manually use the website, but can my bot do this? If so, how? Because I tried to use my bot to click the "Add to Cart" button without clicking the "Accept Cookies" button, but the website wasn't registering the click (even with an implicit wait) - but it works fine when I code the bot to click the "Accept Cookies" button first and then click the "Add to Cart" button.
Thanks in advance for your time.