0
post_title = browser.find_element_by_id('title')
post_title.send_keys(title)
post_image = browser.find_element_by_id('content_ifr')
image=' '+image+'\n'
post_image.send_keys(image)
post_text = browser.find_element_by_id('content_ifr')
post_text.send_keys(text)
time.sleep(5)
#WebElement element = driver.findElement(By("publish"));
#Actions action = new Actions(driver);
#action.moveToElement(element).click().perform();
my_variable = browser.find_element_by_xpath('//*[@id="publish"]') #this is the checkbox
#my_variable.send_keys(webdriver.common.keys.Keys.SPACE)
#browser.switch_to_default_content()
#Pubish = browser.find_element_by_id('publish')
my_variable.click()

Error

Element <input type="submit" name="publish" id="publish" class="button 
button-primary button-large" value="Publish"> is not clickable at point 
(1283, 15). Other element would receive the click: <span class="display- 
name">...</span>

Using python, selenium chrome webdriver to automate WordPress . this is related to new post part . unable to hit publish button

Tried maximizing the window - not working .. Tried changing frame (using Tinymce) - not working tried xpath solution -not working Tried Waiting : not working

Browser: Chrome OS: WIN 10

Request you to explain the solution also

  • Is the element visible in UI , when your script is running ? – cruisepandey Jul 29 '18 at 17:13
  • @cruisepandey element is obviously visible, this problem is due to overlay, Firefox has recently has introduced the exception for this error. We can rescue this error if it's temporary overlay but we can not if it's permanent. – Rajagopalan Jul 29 '18 at 17:38
  • @Rajagopalan : I have seen most of the OP having this kind of exception when the element is not visible in UI , meaning either they will have to scroll down or any other operation to let web driver knows that they are visible and not obscure by any other element. – cruisepandey Jul 29 '18 at 17:42
  • @cruisepandey Your view point is not the view point of driver , for an example what's there in the bottom of stack overflow can't be seen by you but that's still visible to the driver so they don't to have scroll up to bring to the view point, webdriver automatically does but this problem is completely different , this happens only when the targeted element is overlayed by other element , Firefox has two different exception for these two but chrome doesn't have the exception for the overlay. – Rajagopalan Jul 29 '18 at 17:49
  • @Rajagopalan : correct ! That’s what we have in dom , right ? Your points are fine. But from my personal experience I have solved this kind of problem by doing some actions in UI. Nevertheless we can’t solve this question as this has been marked as duplicate by DebanjanB. Thanks for your input though. – cruisepandey Jul 29 '18 at 17:55
  • @cruisepandey Great! Thank you. Yes we can't because he marked as duplicate! – Rajagopalan Jul 29 '18 at 17:57

0 Answers0