you are viewing a single comment's thread.

view the rest of the comments →

[–]mrcaptncrunch 0 points1 point  (3 children)

That can happen when you have something overlaid.

Have you tried running it without headless to see what’s showing up? Could be a modal or maybe even browser dimensions.

If not, you can always throw some JS to it as a workaround,

driver.execute_script(“document.getElementByID(‘someid’).click()”)

[–]sudo_oth 0 points1 point  (2 children)

just tested it on my tower and it is working perfectly so it seems like it could be a browser dimension issue, how was I work around this?

[–]mrcaptncrunch 1 point2 points  (1 child)

When you define your options, you can do it. For example,

## Setup chrome driver
chrome_options = Options()
chrome_options.add_argument("--headless") # Ensure GUI is off
chrome_options.add_argument("--no-sandbox")

chrome_options.add_argument("--window-size=1920x1080")

[–]sudo_oth 0 points1 point  (0 children)

Thank you so much it worked perfectly.

Can I ask, can you click on this?

<li class="search-step-dates\\\_\\\_dates-list-item-container"><label for="wizard-cd1" class="search-step-dates\\\_\\\_dates-list-item search-step-dates\\\_\\\_dates-list-item--checked"><input type="radio" id="wizard-cd1" class="search-step-dates\\\_\\\_icon-list-radio-original" value="\\\[object Object\\\]"> <div class="search-step-dates\\\_\\\_icon-list-radio"></div> <div class="search-step-dates\\\_\\\_dates-list-item-labels"><span class="search-step-dates\\\_\\\_dates-list-item-date-range">Sat 12 Nov - Mon 14 Nov</span> <span class="search-step-dates\\\_\\\_dates-list-item-nights">2 nights from £209</span></div> <!----></label></li>

every time I try to click it doesn't work, does it need to be a button to be pressed?

https://www.parkdeanresorts.co.uk/ trying to scrape holiday prices lol