11 2018 档案
摘要:第一步:复制粘贴找到hosts文件 先按下键盘的win + r ,然后复制c:\windows\system32\drivers\etc粘贴到对话框回车打开文件管理器第二步:复制粘贴修改hosts文件 打开hosts文件,将0.0.0.0 account.jetbrains.com复制粘贴到host
阅读全文
摘要:1 from selenium import webdriver 2 import time 3 import unittest 4 5 class OomTest (unittest.TestCase): 6 def setUp(self): #初始化登录 7 self.driver=webdriver.Chrome() 8 self...
阅读全文
摘要:1. 需定位的元素不在屏幕范围内 2.class name中有空格 3.使用各种方法定位不到元素(因为页面还没加载出来,定位速度太宽) ①使用time.sleep(), 但是有局限性,需要设置较长的等待时间,案例多了测试就很慢 ②等待页面某一个元素出现时,开始定位 4.提示 element not
阅读全文
摘要:1 from selenium import webdriver 2 3 4 driver=webdriver.Chrome(executable_path = 'C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe')
阅读全文
摘要:1.python中安装selenium包 2.下载chrom浏览器,下载chromdrvier.exe 3.将chromdrvier.exe,复制到chrome的安装目录(C:\Program Files (x86)\Google\Chrome\Application\chromedriver.ex
阅读全文