Exemplo n.º 1
0
 def icon_wait(self, dict):
     try:
         x = self.sn.wait(dict['key'], int(dict['sec']))
         if x == False:
             raise error.notfind()
     except:
         raise error.notfind()
Exemplo n.º 2
0
 def icon_click(self, name):
     try:
         x = self.sn.exists(name['key'])
         if x != "None":
             self.sn.click(name['key'])
         else:
             raise error.notfind()
     except:
         raise error.notfind()
Exemplo n.º 3
0
 def icon_hover(self, name):
     try:
         x = self.screen.exists(name['key'])
         if x != "None":
             self.sn.hover(name['key'])
         else:
             raise error.notfind()
     except:
         raise error.notfind()
Exemplo n.º 4
0
    def zero_pwd_set(self, browser, value_dict):
        try:
            local_dict = dict(value_dict)
            elem = browser.find_element_by_id('password')
            elem.send_keys(local_dict["key"])

        except:
            raise error.notfind()
Exemplo n.º 5
0
 def textbox_password_set(self, browser, value_dict):
     try:
         local_dict = dict(value_dict)
         elem = browser.find_element_by_id(
             config.get("login", "id_signin_passwd"))
         elem.send_keys(local_dict["key"])
     except:
         raise error.notfind()
Exemplo n.º 6
0
 def zero_username_set(self, browser, value_dict):
     try:
         local_dict = dict(value_dict)
         elem = browser.find_element_by_id(config.get(
             "loginn", "id_sign_u"))
         #elem = browser.find_element_by_id('username')
         elem.send_keys(local_dict["key"])
     except:
         raise error.notfind()
Exemplo n.º 7
0
 def button_login_click(self, browser):
     try:
         text = config.get("login", "class_signin_button")
         xpath = "//button[@class='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         elem.click()
     except:
         raise error.notfind()
Exemplo n.º 8
0
 def save_click(self, browser):
     try:
         text = config.get("sharefolder_common", "class_save_button")
         xpath = "//button[@ng-click='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         Hover = ActionChains(browser).move_to_element(elem)
         Hover.click().perform()
     except:
         raise error.notfind()
Exemplo n.º 9
0
 def nor_text_foldername_set(self, browser, value_dict):
     try:
         local_dict = dict(value_dict)
         text = config.get("sharefolder_normail", "placeholder_folder_text")
         xpath = "//input[@placeholder='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         #Hover = ActionChains(browser).move_to_element(elem)
         elem.send_keys(local_dict["key"])
     except:
         raise error.notfind()
Exemplo n.º 10
0
 def nor_checkbox_smbandcifs_click(self, browser):
     try:
         text = config.get("sharefolder_normail",
                           "ng-model_smbandcifs_text")
         xpath = "//input[@ng-model='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         Hover = ActionChains(browser).move_to_element(elem)
         Hover.click().perform()
     except:
         raise error.notfind()
Exemplo n.º 11
0
 def aclsetfolder_click(self, browser):
     try:
         text = config.get("sharefolder_common",
                           "class_aclsetfolder_button")
         xpath = "//ul//li[contains(.,'replace')]"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         Hover = ActionChains(browser).move_to_element(elem)
         Hover.click().perform()
     except:
         raise error.notfind()
Exemplo n.º 12
0
 def newfolder_click(self, browser):
     try:
         text = config.get("setting", "class_new_button")
         xpath = "//button[@class='replace ']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         Hover = ActionChains(browser).move_to_element(elem)
         Hover.click().perform()
         #print elem.text
     except:
         raise error.notfind()
Exemplo n.º 13
0
 def nor_text_sharefoldername_clear(self, browser):
     try:
         text = config.get("sharefolder_normail",
                           "placeholder_sharefolder_text")
         xpath = "//input[@placeholder='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         #Hover = ActionChains(browser).move_to_element(elem)
         elem.clear()
     except:
         raise error.notfind()
Exemplo n.º 14
0
 def sharefolder_click(self, browser):
     try:
         text = config.get("overview", "class_sharefolder")
         xpath = "//div[@class='replace']"
         elem = browser.find_element_by_xpath(xpath.replace(
             "replace", text))
         Hover = ActionChains(browser).move_to_element(elem)
         Hover.click().perform()
         #print elem.text
     except:
         raise error.notfind()
Exemplo n.º 15
0
 def testerror_get(self):
     raise error.notfind()
Exemplo n.º 16
0
 def text_type(self, text):
     try:
         self.sn.type(text['value'])
     except:
         raise error.notfind()
Exemplo n.º 17
0
 def file_verify(self):
     my_file = Path("test.txt")
     if my_file.is_file() == True:
         return
     else:
         raise error.notfind()
Exemplo n.º 18
0
 def enter_type(self):
     try:
         self.sn.type("\n")
     except:
         raise error.notfind()