Python selenium.webdriver.common.keys.Keys 模块,SPACE 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用selenium.webdriver.common.keys.Keys.SPACE

项目:robotframework-weblibrary    作者:Netease-AutoTest    | 项目源码 | 文件源码
def _map_ascii_key_code_to_key(self, key_code):
        map = {
            0: Keys.NULL,
            8: Keys.BACK_SPACE,
            9: Keys.TAB,
            10: Keys.RETURN,
            13: Keys.ENTER,
            24: Keys.CANCEL,
            27: Keys.ESCAPE,
            32: Keys.SPACE,
            42: Keys.MULTIPLY,
            43: Keys.ADD,
            44: Keys.SEPARATOR,
            45: Keys.SUBTRACT,
            56: Keys.DECIMAL,
            57: Keys.DIVIDE,
            59: Keys.SEMICOLON,
            61: Keys.EQUALS,
            127: Keys.DELETE
        }
        key = map.get(key_code)
        if key is None:
            key = chr(key_code)
        return key
项目:mes    作者:osess    | 项目源码 | 文件源码
def press_space(self):
        a = ActionChains(self.browser)
        a.key_down(Keys.SPACE)
        a.perform()