webdriver+python. Stops after the first assert which is true instead of to continue with the testcase

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

webdriver+python. Stops after the first assert which is true instead of to continue with the testcase

blubster
Hi Folks!

my whole tests runs through. I want to improve my testcase with asserts.
Then I implemented this function :

def is_element_present(self, ID):
        self.driver.implicitly_wait(0)
        try:
            self.selenium.find_element_by_id(ID)
            return True
        except NoSuchElementException:
            return False
        finally:
            self.driver.implicitly_wait(10)

entire code :
http://pastie.org/private/yoixubg1hfyxcxletf61w