大数据最新【uiautomation+selenium】学习自动化(2024,面试大厂应该注意哪些问题
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
需要这份系统化资料的朋友,可以戳这里获取
每隔一段时间后会出现授权信息
agree_btn = wechatWindow_2.ButtonControl(Name=“同意”)
if agree_btn.Exists():
agree_btn.Click()
max = wechatWindow_2.ButtonControl(Name=‘向下还原’)
判断页面是否最大化
if max.Exists():
max.Click()
study_icon = wechatWindow_2.ImageControl(Name=‘立即学习’)
study_icon.Click()
到达立即参与界面
participate_in_btn = wechatWindow_2.DocumentControl(Name=“青春浙江“青年大学习””).GetChildren()[0].GetChildren()[4].GetChildren()[0]
participate_in_btn.Click()
# 到达去学习界面
study_page = wechatWindow_2.DocumentControl(Name=“青春浙江“青年大学习””).GetChildren()[0].GetChildren()[3].GetChildren()[0]
time.sleep(5)
study_btn = study_page.GetChildren()[9]
study_btn.Click()
max_page = wechatWindow_2.ButtonControl(Name=‘最大化’)
max_page.Click()
time.sleep(2)
edit = wechatWindow_2.EditControl(searchDepth=5).GetValuePattern().Value
print(edit)
向下还原
restore_page = wechatWindow_2.ButtonControl(Name=‘向下还原’)
restore_page.Click()
关闭具体页面
wechatWindow_2.ButtonControl(Name=‘关闭’).Click()
关闭微信界面
wechatWindow.ButtonControl(Name=‘关闭’).Click()
‘’‘3’‘’
def desktop_path():
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r’Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders’)
desktop = winreg.QueryValueEx(key, “Desktop”)[0]
# print(desktop)
return desktop
driver = webdriver.Chrome()
driver.get(edit)
窗口最大化
driver.maximize_window()
time.sleep(1)
进入iframe
driver.switch_to.frame(0)
time.sleep(1)
根据文本
Select(driver.find_element(by=By.CSS_SELECTOR, value=‘#province’)).select_by_visible_text(‘浙江省’)
time.sleep(1)
Select(driver.find_element(by=By.CSS_SELECTOR, value=‘#city’)).select_by_visible_text(‘绍兴市’)
time.sleep(1)
省市地址确定
todo
driver.find_element(by=By.XPATH, value=‘/html/body/div[2]/div[8]/div[3]’).click()
driver.find_element(by=By.XPATH, value=‘/html/body/div[2]/div[9]/div[3]’).click()
开始学习
driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section0.topindex.ani > div.start_btn.on’).click()
倍速
time.sleep(2)
driver.execute_script(“document.querySelector(‘video’).playbackRate = 15.0;”)
while True:
try:
# 是否出现题目
driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section1.topindex1’)
time.sleep(0.1)
# 选A
driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section1.topindex1 > div.w1.option’).click()
time.sleep(0.1)
# 确认按钮
driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section1.topindex1 > div.button’).click()
# 继续学习
time.sleep(2.5)
driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section1.topindex1 > div.continue’).click()
# 15倍速
driver.execute_script(“document.querySelector(‘video’).playbackRate = 15.0;”)
except:
pass
try:
if driver.find_element(by=By.CSS_SELECTOR, value=‘body > div.container > div.section3.topindex2’):
time.sleep(1)
a = time.time()
# driver.get_screenshot_as_file(r’C:\Users\knighthood\OneDrive\桌面{}.png’.format(a))
driver.get_screenshot_as_file(r’{}{}.png’.format(desktop_path(), a))
break
except:
pass
driver.close()
![img](https://img-blog.csdnimg.cn/img_convert/8350e6d6a7f67ff319b8a72182226d9c.png) ![img](https://img-blog.csdnimg.cn/img_convert/e4a7f7ef908d7b6d9a15d25d122e8f0d.png) ![img](https://img-blog.csdnimg.cn/img_convert/9beb21a1019ec57bdd37f0e909d0cd33.png) **既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!** **由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新** **[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)** 是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新** **[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**