Def testFirstAutomationTest (self) :
If len (self) driver) find_elements_by_xpath ("//* [@ text='OK'] ")) & gt; 0:
Self. Driver. Find_element_by_xpath ("//* [@ text='OK'] "). Click ()
Self. Driver. Find_element_by_xpath ("//* [@ text='Username'] "). The send_keys (' company ')
Self. Driver. Find_element_by_xpath ("//* [@ text='Password'] "). The send_keys (' company ')
Self. Driver. Find_element_by_xpath ("//* [@ text='Login'] "). Click ()
There is a piece of code as above, I can find the Username, Password and Login, but can't find this OK elements