I am trying to click a button with Selenium, but keeps returning that the element is not interactable. I tried maximazing the window, explicit waits, but the program simple exits after the waiting time.
<div class="actions-toolbar">
:: before
<div class="primary">
<button class="action primary checkout" type="submit" data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed()},
enable: (getCode() == isChecked())
" title="Go to payment">
<span data-bind="i18n: 'Place Order'">Go to payment</span>
</button>
</div>
::after
</div>
This is what I have coding:
download_button_path = "//div[@class='actions-toolbar']/div[@class='primary']/button[1]"
button_to_click = driver.find_element(By.XPATH, download_button_path)
hover = ActionChains(driver).move_to_element(button_to_click)
hover.perform()
button_to_click.click()