def test_16(self): try: rules(46, login) rule_46(self, login, password) except: self.driver.switch_to.context('NATIVE_APP') directory = '%s/screenshots/' % os.getcwd() file_name = 'test_16.png' self.driver.save_screenshot(directory + file_name) raise finally: rules(46, login)
def test_05(self): try: rules(20, login) autologin(self, login, password) self.driver.switch_to.context('NATIVE_APP') err = self.driver.find_element_by_id( "ua.com.cs.ifobs.mobile.android.otp:id/dialogText" ).get_attribute('text') self.assertEqual(err, "There is no right to login") except: self.driver.switch_to.context('NATIVE_APP') directory = '%s/screenshots/' % os.getcwd() file_name = 'test_05.png' self.driver.save_screenshot(directory + file_name) raise finally: rules(20, login)