Please help because this is driving me nuts.
This should be simple - clicking an element. But for the life of me, I can't find a way to do it.
I can locate it with each method I've tried, but I cannot seem to click it. I've tried by class name, by XPath class, by XPath span text, I've tried forcing the click with javascript. Nothing. This blue OK button is seemingly unclickable.
I'm starting to think it could be because of the div shape, which I'll attach in an image. It looks like the div goes to the left of the button as well, so maybe it's just clicking the empty space next to the button that also happens (for whatever reason) to be covered by the div? If so, is there a way to specify what part of a div is clicked?
Here is what I've tried:
browser.find_element_by_class_name('ok')
browser.find_element(By.XPATH, "//div[@class='ok']")
browser.execute_script("arguments[0].click();",
WebDriverWait(browser, 10).until(EC.element_to_be_clickable
((By.Class, "ok"))))
browser.FindElement(By.XPath("//div[@class='ok']/span[@class='OK']"));