selenium-- assertion methods

 

# Return value are equal 
self.assertEqual (A, B)       # Analyzing == B A 
self.assertNotEqual (A, B)    # Analyzing A! = B 

# returned value is a Boolean value 
self.assertTrue (X)      # Analyzing bool Boolean (the X-) iS True 
self.assertFalse (the X-)     # judge Boolean value BOOL (the X-) iS False 

# return value is empty 
self.assertIsNone (the X-)      # determine whether the air iS None the X- 
self.assertIsNotNone (the X-)   # determine whether None not empty iS X 

# return value if a certain value 
self.assertIn (a, b)        # is determined in a b b in which a 
self.assertNotIn (a, b)     # determines a not inside a not in b b

 

Guess you like

Origin www.cnblogs.com/yitao326/p/10985566.html