Hi All,
I am writing the python/selenium script to automate web page.I am struck in a place wherein the popup appears,after clicking on 'OK' in the popup ,control should transfer back to web page.
I have tried with below script.But still I am not able to proceed .Please help me out on this.
Can anyone please help me out on this.
def is_alert_present(self):
try:
self.driver.switch_to_alert()
self.assertEquals("Channel Created Succesfully")
except NoAlertPresentException as e:
return False
def close_alert_and_get_its_text(self):
try:
alert = self.driver.switch_to_alert()
assert "Channel Created Succesfully." in alert.text
if self.accept_next_alert:
alert.accept()
else:
alert.dismiss()
return alert.text
finally: self.accept_next_alert = True
def tearDown(self):
self.assertEqual([], self.verificationErrors)
--
Thanks & Regards
Ranjana P