os.path.abspath()
os 模块为 python 语言标准库中的 os 模块包含普遍的操作系统功能。主要用于操作本地目录文件。path.abspath()方法用于获取当前路径下的文件。
比如:
file_path = \'file:///\' + os.path.abspath(\'checkbox.html\')
driver.get(file_path)
os.path.abspath()
os 模块为 python 语言标准库中的 os 模块包含普遍的操作系统功能。主要用于操作本地目录文件。path.abspath()方法用于获取当前路径下的文件。
比如:
file_path = \'file:///\' + os.path.abspath(\'checkbox.html\')
driver.get(file_path)
相关文章: