def test_Validatepersonal(self): per = locatorReader.readLocData('Locators', 'online') self.driver.find_element_by_xpath(per).click() read_usr = locatorReader.readLocData('Locators', 'user_name') self.driver.find_element_by_xpath(read_usr).send_keys("admin") read_data_pass = locatorReader.readLocData('Locators', 'passwd') self.driver.find_element_by_xpath(read_data_pass).send_keys("admin") bttn_clk = locatorReader.readLocData('Locators', 'bttn') self.driver.find_element_by_xpath(bttn_clk).click() time.sleep(10) sign_off = locatorReader.readLocData('Locators','sign_off') self.driver.find_element_by_xpath(sign_off).click()
def test_Validatesearchcall(self, data): log = logging.getLogger('test_Validatecall') read_data_search = locatorReader.readLocData('Locators', 'serch_item') print(read_data_search) # self.driver.find_element_by_xpath(read_data_search).send_keys() # #search_go read_search_go = locatorReader.readLocData('Locators', 'search_go') # self.driver.find_element_by_xpath(read_data_search).click() # time.sleep(5) self.driver.find_element_by_xpath(read_data_search).send_keys(data[0]) self.driver.find_element_by_xpath(read_search_go).click() time.sleep(5)
def test_Validatecall(self): log = logging.getLogger('test_Validatecall') read_data_sin = locatorReader.readLocData('Locators', 'Sign_In') print(read_data_sin) self.driver.find_element_by_xpath(read_data_sin).click() log.debug('click sign in button') read_usr = locatorReader.readLocData('Locators', 'user_name') self.driver.find_element_by_xpath(read_usr).send_keys("admin") log.debug('locate and enter username ') read_data_pass = locatorReader.readLocData('Locators', 'passwd') self.driver.find_element_by_xpath(read_data_pass).send_keys("admin") log.debug('locate and enter passwod ') bttn_clk = locatorReader.readLocData('Locators', 'bttn') self.driver.find_element_by_xpath(bttn_clk).click() log.debug('locate button and click button ') print(read_data_pass) gettitle = self.driver.title print("The title of webpage is : " + gettitle) log.debug('title of the page is :')
def clickSignoff(self): sign_off = locatorReader.readLocData('Locators', 'sign_off') driver.find_element_by_xpath(sign_off).click()
def clickSubmitButton(self): bttn_clk = locatorReader.readLocData('Locators', 'bttn') driver.find_element_by_xpath(bttn_clk).click() time.sleep(10)
def enterPassword(self, password): read_data_pass = locatorReader.readLocData('Locators', 'passwd') driver.find_element_by_xpath(read_data_pass).send_keys(password)
def enterUsername(self, username): read_usr = locatorReader.readLocData('Locators', 'user_name') driver.find_element_by_xpath(read_usr).send_keys(username)
def clicksingIn(self): read_data_sin = locatorReader.readLocData('Locators', 'Sign_In') driver.find_element_by_xpath(read_data_sin).click()