python matplotlib安裝,python如何定位路徑_selenium_webdriver(python)查看文件路徑,鼠標定位

 2023-10-04 阅读 31 评论 0

摘要:#coding=utf-8from selenium import webdriverfrom selenium.webdriver.support.ui import WebDriverWaitimport timeimport ospython matplotlib安裝。driver = webdriver.Firefox()#獲取aaa.html的絕對路徑file_path = os.path.abspath('aaa.html')prin

#coding=utf-8

from selenium import webdriver

from selenium.webdriver.support.ui import WebDriverWait

import time

import os

python matplotlib安裝。driver = webdriver.Firefox()

#獲取aaa.html的絕對路徑

file_path = os.path.abspath('aaa.html')

print file_path

driver.get(file_path)

#點擊Link1鏈接(彈出下拉列表)

python生成的文件在哪里?driver.find_element_by_xpath("html/body/div[1]/div/div/a").click()

#在下拉列表中找到如下xpath路徑對應元素

menu = driver.find_element_by_xpath("//*[@id='dropdown1']/li[1]/a")

time.sleep(3)

#鼠標定位到該元素上

webdriver.ActionChains(driver).move_to_element(menu).perform()

python讀取指定路徑文件。time.sleep(3)

driver.quit()

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/1/111938.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息