html怎么设置在新窗口中显示,html怎么设置右边框

首页 > 实用技巧 > 作者:YD1662023-10-28 17:55:46

20230418星期二:


打开新窗口的语法:注意 newUrl 加引号

newUrl = 'https://chromedriver.storage.googleapis.com/index.html' newwindow = f'window.open("{newUrl}")' driver.execute_script(newwindow)

当前句柄,当前总的句柄(当前窗口,当前所有窗口):

print("当前窗口:",driver.current_window_handle) print("当前总的窗口:",driver.window_handles)

切换窗口语句:通过索引进行切换

driver.switch_to.window(driver.window_handles[0]) driver.switch_to.window(driver.window_handles[1])

html怎么设置在新窗口中显示,html怎么设置右边框(1)

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.