码迷,mamicode.com
首页 >  
搜索关键字:selenium 2    ( 6249个结果
selenium - unittest一个简单的demo
待测文件: calculate.py文件1 class Count: 2 def __init__(self, a, b): 3 self.a = a 4 self.b = b 5 6 def add(self): 7 return self.a + self.b 使用unittest框架进行测试: ...
分类:其他好文   时间:2020-03-29 10:42:34    阅读次数:66
selenium 的显示等待和隐式等待的区别(记录加强版)
什么是显示等待和隐式等待? 显示等待就是有条件的等待隐式等待就是无条件的等待 隐式等待 当使用了隐式等待执行测试的时候,如果 WebDriver 没有在 DOM 中找到元素,将继续等待,超出设定时间后则抛出找不到元素的异常,换句话说,当查找元素或元素并没有立即出现的时候,隐式等待将等待一段时间再查找 ...
分类:其他好文   时间:2020-03-28 21:45:05    阅读次数:58
【复习】Selenium中鼠标相关操作
![](https://s4.51cto.com/images/blog/202003/28/ec001a262f9a7dfe7eb853b1241a87de.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3p
分类:其他好文   时间:2020-03-28 17:46:18    阅读次数:70
【复习】selenium中滚动操作
![](https://s4.51cto.com/images/blog/202003/28/535ce142d39da77b7fdf33c8baf3e50c.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3p
分类:其他好文   时间:2020-03-28 11:50:18    阅读次数:92
自动化测试selenium模块webdriver的使用
一、webdriver基本使用命令 from selenium import webdriver # 导入webdriver模块 >>> chrome_obj = webdriver.Chrome() # 打开Google浏览器 >>> chrome_obj.get("https://www.bai ...
分类:Web程序   时间:2020-03-28 10:36:23    阅读次数:73
Selenium WebUI自动化测试--PO中传递driver
UI自动测试时,我们常会选择PO设置模式,在PO设计模式中,我们需要考虑如何将页面元素和页面提供的功能优雅的封装,今天简单的讲下两种页面封装方法,仅供参考。 第一种 Page中传递driver 在这之前,UI自动化测试中,一直使用传递方式进行driver,也是一种比较简洁的方法,代码如下: 1 /* ...
分类:Web程序   时间:2020-03-28 00:43:30    阅读次数:194
Selenium-Switch
from selenium import webdriver driver = webdriver.Chrome()driver.get('https://baidu.com/') 1.切换Tab到最后一个页签 driver.switch_to.window(driver.window_handle ...
分类:其他好文   时间:2020-03-27 17:14:30    阅读次数:81
Selenium getCssValue/getCSSProperty
const font = elem.getCSSProperty('font-family') console.log(font) border-bottom-color color display text-align height background font-family font-size ...
分类:Web程序   时间:2020-03-27 16:54:34    阅读次数:76
selenium之执行JS
selenium执行js语句主要靠execute_script()方法实现。 实例如下: from selenium import webdriver bro=webdriver.Chrome() bro.get("https://www.zhihu.com/explore") bro.execut ...
分类:Web程序   时间:2020-03-27 12:48:07    阅读次数:101
selenium ActionChains(动作链常用API)
用selenium做自动化,有时候会遇到需要模拟鼠标操作才能进行的情况,比如单击、双击、点击鼠标右键、拖拽等等。而selenium给我们提供了一个类来处理这类事件——ActionChains 0 perform() ——执行链中的所有动作 1 click()——单击当前元素 2 click_and_ ...
分类:Windows程序   时间:2020-03-27 00:31:12    阅读次数:194
6249条   上一页 1 ... 65 66 67 68 69 ... 625 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!