当前位置: 首页>>代码示例>>Python>>正文


Python Keys.COMMAND属性代码示例

本文整理汇总了Python中selenium.webdriver.common.keys.Keys.COMMAND属性的典型用法代码示例。如果您正苦于以下问题:Python Keys.COMMAND属性的具体用法?Python Keys.COMMAND怎么用?Python Keys.COMMAND使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在selenium.webdriver.common.keys.Keys的用法示例。


在下文中一共展示了Keys.COMMAND属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: start_captcha

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def start_captcha():
    driver = webdriver.Firefox()
    driver.get("http://reddit.com")
    driver.find_element(By.XPATH, "//*[@id=\"header-bottom-right\"]/span[1]/a").click()
    time.sleep(1)
    driver.find_element(By.ID, "user_reg").send_keys("qwertyuiop091231")
    driver.find_element(By.ID, "passwd_reg").send_keys("THISISMYPASSWORD!!$")
    driver.find_element(By.ID, "passwd2_reg").send_keys("THISISMYPASSWORD!!$")
    driver.find_element(By.ID, "email_reg").send_keys("biggie.smalls123@gmail.com")
    #driver.find_element_by_tag_name("body").send_keys(Keys.COMMAND + Keys.ALT + 'k')
    iframeSwitch = driver.find_element(By.XPATH, "//*[@id=\"register-form\"]/div[6]/div/div/div/iframe")
    driver.switch_to.frame(iframeSwitch)
    driver.find_element(By.ID, "recaptcha-anchor").click()
    # download captcha image
    # 
    # split payload
    # 
    # reverse_search
    # 
    # driver.quit()

# determines if an image keywords matches the target keyword
# uses the synonyms of the image keyword 
开发者ID:ecthros,项目名称:uncaptcha,代码行数:25,代码来源:ris.py

示例2: select_all

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def select_all(self):
        elem = self.__get_element(self.k, self.v)
        if platform.system().lower() == "darwin":
            elem.send_keys(Keys.COMMAND, "a")
        else:
            elem.send_keys(Keys.CONTROL, "a") 
开发者ID:SeldomQA,项目名称:poium,代码行数:8,代码来源:page_objects.py

示例3: cut

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def cut(self):
        elem = self.__get_element(self.k, self.v)
        if platform.system().lower() == "darwin":
            elem.send_keys(Keys.COMMAND, "x")
        else:
            elem.send_keys(Keys.CONTROL, "x") 
开发者ID:SeldomQA,项目名称:poium,代码行数:8,代码来源:page_objects.py

示例4: copy

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def copy(self):
        elem = self.__get_element(self.k, self.v)
        if platform.system().lower() == "darwin":
            elem.send_keys(Keys.COMMAND, "c")
        else:
            elem.send_keys(Keys.CONTROL, "c") 
开发者ID:SeldomQA,项目名称:poium,代码行数:8,代码来源:page_objects.py

示例5: paste

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def paste(self):
        elem = self.__get_element(self.k, self.v)
        if platform.system().lower() == "darwin":
            elem.send_keys(Keys.COMMAND, "v")
        else:
            elem.send_keys(Keys.CONTROL, "v") 
开发者ID:SeldomQA,项目名称:poium,代码行数:8,代码来源:page_objects.py

示例6: control_key

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def control_key(self):
        is_osx = self.platform.startswith('OS X')
        return Keys.COMMAND if is_osx else Keys.CONTROL 
开发者ID:SEL-Columbia,项目名称:dokomoforms,代码行数:5,代码来源:test_selenium.py

示例7: select_all

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def select_all(self):
            if platform.system().lower() == "darwin":
                self.elem.send_keys(Keys.COMMAND, "a")
            else:
                self.elem.send_keys(Keys.CONTROL, "a") 
开发者ID:SeldomQA,项目名称:seldom,代码行数:7,代码来源:webdriver.py

示例8: cut

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def cut(self):
            if platform.system().lower() == "darwin":
                self.elem.send_keys(Keys.COMMAND, "x")
            else:
                self.elem.send_keys(Keys.CONTROL, "x") 
开发者ID:SeldomQA,项目名称:seldom,代码行数:7,代码来源:webdriver.py

示例9: copy

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def copy(self):
            if platform.system().lower() == "darwin":
                self.elem.send_keys(Keys.COMMAND, "c")
            else:
                self.elem.send_keys(Keys.CONTROL, "c") 
开发者ID:SeldomQA,项目名称:seldom,代码行数:7,代码来源:webdriver.py

示例10: paste

# 需要导入模块: from selenium.webdriver.common.keys import Keys [as 别名]
# 或者: from selenium.webdriver.common.keys.Keys import COMMAND [as 别名]
def paste(self):
            if platform.system().lower() == "darwin":
                self.elem.send_keys(Keys.COMMAND, "v")
            else:
                self.elem.send_keys(Keys.CONTROL, "v") 
开发者ID:SeldomQA,项目名称:seldom,代码行数:7,代码来源:webdriver.py


注:本文中的selenium.webdriver.common.keys.Keys.COMMAND属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。