TA的每日心情 | 无聊 10 小时前 |
---|
签到天数: 529 天 连续签到: 1 天 [LV.9]测试副司令
|
1测试积点
-
- def get_id(driver):
- driver.get('chrome://extensions/')
- shadow = driver.find_element(By.XPATH,'//extensions-manager')
- shadowroot = get_shadow(shadow,driver)
- shadow1 = shadowroot.find_element_by_xpath('//*[@id="items-list"]')
- def get_shadow(ele,driver):
- shadow_root = driver.execute_script('return arguments[0].shadowRoot', ele)
- return shadow_root
- if __name__ == '__main__':
- options = Options()
- options.add_argument("--user-data-dir=" + r"C:/Users/Administrator/AppData/Local/Google/Chrome/User Data/")
- driver = uc.Chrome(options, version_main=96)
- username = 'pierrelattimer53@gmail.com'
- password = 'asyufguia646'
- secret = '7vqx4dzbp35un7xllg6mm7dy'
- # get_exe(driver,username,password,secret)
- get_id(driver)
-
-
复制代码- js = "return document.getElementsByTagName('iframe')[4]"
- element = driver.execute_script(js)
- print(element)
- p = element.find_element_by_xpath("//div[@class='task-grid']")
-
复制代码
|
|