I'm attempting to accept a javascript alert that pops up when deleting an element on my webpage. When I use accept_alert()
or dismiss_alert()
, I'm receiving the NoAlertPresentException: Message: u'no alert open\n
message. My code looks like this:
click_element(get_element_by_xpath('//*[@id="tracker"]/table[4]/tbody/tr/td[1]/a[1]'),wait=True)
accept_alert('Do you wish to delete?')
I have only been working with SST for 2 weeks, so I may be missing a simple solution.
The code that calls the javascript alert is as follows:
<a href="javascript: void(0);" onclick="return DeleteFood(1293652875);" class="track_remove" title="Remove">⊗</a>