Home > Mobile >  Can't click next page table (onclick=proceed()) with Selenium
Can't click next page table (onclick=proceed()) with Selenium

Time:10-18

I've tried many ways to do this but I still can't get to the next page. I'm using Selenium on Python and the SafariDriver.

The Next Page table is as follows:

<div id="input_nav">
<table  onclick="proceed();" align="right">
  <tbody><tr>
    <td align="right">Next Step:<br><div id="nav_title">Select Model/Chain</div></td>
    <td width="51" align="left"><img src="images/basic/next.png"></td>
  </tr>
</tbody></table>
</div>

I have tried

next_page = browser.find_element(By.XPATH, "//*[@id='input_nav']/table/tbody/tr/td[2]/img")
next_page.click()
# next_page.send_keys(Keys.RETURN) # also tried this

and

next_page = browser.find_element(By.XPATH, "//*[@id='input_nav']/table")

and

next_page = browser.find_element(By.ID, "nav_title")
ed = webdriver.common.action_chains.ActionChains(browser)
ed.move_to_element(next_page).move_by_offset(1,1).click().perform()

and

WebDriverWait(browser, 20).until(EC.presence_of_element_located((By.CLASS_NAME,"nav_entry"))).find_element(By.XPATH, "//*[@id='nav_title']").click()

but none of these work. They run but nothing happens on the page. Would anyone happen to know how to click the next page? Thanks in advance.

CodePudding user response:

The problem was in the SafariDriver. Clicking the element worked just fine with ChromeDriver.

  • Related