def Gotologinpage(self):
     try:
         element = self.driver.find_element_by_id(Locators.SignIn_Button_id)
         WebActions.click_on_element(self, element)
         Log.write_info_to_log_file(self, "Login successfully")
     except:
         print("")
예제 #2
0
 def select_sofas_by_type(self):  
     try:
         sofas_type = self.driver.find_element_by_xpath(Locators.select_sofa_type_by_xpath)
         WebActions.click_on_element(self, sofas_type)
         Log.write_info_to_log_file(self,"sofa type selected successfully")
     except:
         Log.write_errors_to_log_file(self,"sofas type not selected")
예제 #3
0
 def select_sofas_as_furniture_cateogry(self):
     try:
         element = self.driver.find_element_by_xpath(Locators.select_sofas_as_furniture_category_by_xpath)
         WebActions.click_on_element(self, element) 
         Log.write_info_to_log_file(self,"sofas as furniture category selected")
     except TimeoutException:
         Log.write_errors_to_log_file(self,"selection of furniture category failed")
 def clickonloginbutton(self):
     try:
         element = self.driver.find_element_by_id(Locators.Login_button_id)
         WebActions.click_on_element(self, element)
         Log.write_info_to_log_file(self,
                                    "clicked on login button successfully")
     except:
         Log.write_errors_to_log_file(self,
                                      "clicked on login button failed")
예제 #5
0
 def navigatebacktoHomepage(self):
     try:
         element = self.driver.find_element_by_class_name(
             Locators.Nav_home_page_class_name)
         WebActions.click_on_element(self, element)
         Log.write_info_to_log_file(self,
                                    "Navigate to Home Page successfully")
     except:
         Log.write_errors_to_log_file(
             self, "Navigation to Home Page is not successfully")
예제 #6
0
 def checkOrders(self):
     try:
         element = self.driver.find_element_by_id(
             Locators.Nav_order_page_class_name)
         WebActions.click_on_element(self, element)
         Log.write_info_to_log_file(self,
                                    "Element is clicked on successfully")
     except:
         Log.write_errors_to_log_file(
             self, "Element is not clicked successfully")
 def clickfornextloginpage(self):
     try:
         element = self.driver.find_element_by_id(
             Locators.Continue_Button_id)
         WebActions.click_on_element(self, element)
         Log.write_info_to_log_file(
             self, "Navigate to next Login page successfully")
     except:
         Log.write_errors_to_log_file(self,
                                      "Click on next login button Failed")