def testFirstAutomationTest(self):
if len(self.driver.find_elements_by_xpath("//*[@text='OK']")) > 0:
self.driver.find_element_by_xpath("//*[@text='OK']").click()
self.driver.find_element_by_xpath("//*[@text='Username']").send_keys('company')
self.driver.find_element_by_xpath("//*[@text='Password']").send_keys('company')
self.driver.find_element_by_xpath("//*[@text='Login']").click()
有一段代码如上,我能找到Username,Password和Login,但是这个OK元素找不到