随笔分类 -  python3-selenium3

摘要:https://www.cnblogs.com/soundcode/p/15910729.html 阅读全文 »
posted @ 2024-08-13 16:21 忧伤恋上了快乐 编辑
摘要:背景 前面的教程实现了在远程服务器上部署selenium+chrome/firefox+vncserver实现了远程服务器端脚本运行的GUI可视化。这样不方便的地方是,脚本需要在服务器端编辑或者上传脚本到服务器端,对于调试中的项目来说十分不方便。 看了selenium remote server 的 阅读全文 »
posted @ 2022-06-16 11:45 忧伤恋上了快乐 编辑
摘要:baseui工具类_封装selenium的常用方法 #! /usr/bin/env python # -*- coding: utf-8 -*- import time import allure from selenium.webdriver import ActionChains from se 阅读全文 »
posted @ 2021-08-23 17:28 忧伤恋上了快乐 编辑
摘要:tomorrow是我最近在用的一个爬虫利器,该模块属于第三方的模块,使用起来非常的方便,只需要用其中的threads方法作为装饰器去修饰一个普通的函数,既可以达到并发的效果,本篇将用实例来展示tomorrow的强大之处。后面文章将对tomorrow的实现原理做进一步的分析。 1.安装第三方包 pip 阅读全文 »
posted @ 2020-07-10 15:23 忧伤恋上了快乐 编辑
摘要:slemium webdriver 支持多种情况模拟用户操作浏览器。如:IE,chrome,Firefox等。同时,selenium还有一种HtmlUnit Driver驱动能够在不启动浏览器的情况下运行相关测试用例。 利用HtmlUnit Driver方式运行测试用例大大减少了等待浏览器展现的时间 阅读全文 »
posted @ 2018-05-29 10:04 忧伤恋上了快乐 编辑
摘要:1. 强制等待 第一种也是最简单粗暴的一种办法就是强制等待sleep(xx),强制让闪电侠等xx时间,不管凹凸曼能不能跟上速度,还是已经提前到了,都必须等xx时间。 看代码: ? 1 2 3 4 5 6 7 8 9 10 11 # -*- coding: utf-8 -*- from seleniu 阅读全文 »
posted @ 2018-05-24 14:08 忧伤恋上了快乐 编辑
摘要:使用WebDriver在Chrome浏览器上进行测试时,需要从http://chromedriver.storage.googleapis.com/index.html网址中下载与本机chrome浏览器对应的驱动程序,驱动程序名为chromedriver; chromedriver的版本需要和本机的 阅读全文 »
posted @ 2018-05-23 14:55 忧伤恋上了快乐 编辑
摘要:一、准备环境 webservice接口测试,需要用到suds库,网上百度的各种suds库都没法安装,我这里的Python3.5版本,所以安装不了那些suds库也没有办法在线安装,所以这里就提供一个大家都可用的方法和suds库。 1)下载suds库,地址:http://pypi.python.org/ 阅读全文 »
posted @ 2018-05-23 11:03 忧伤恋上了快乐 编辑
摘要:python测试框架 关于框架: Vantpy框架基于Selenium2+ unittest 搭建的WebUI自动化测试框架 特点: 使用POM(页面对象模式)设计,使我们写的代码更加简单,后期更加容易维护以及复用性更高 支持多种定位方式,包括(xpath/css/ID/text/link_text 阅读全文 »
posted @ 2018-05-22 08:45 忧伤恋上了快乐 编辑
摘要:一. 一个.py文件批量执行测试用例(一个.py文件下多个用例执行) 如果直接使用:unittest.main(),则按字母顺序执行, 对于前后之间又依赖关系的用例,需要按特定的顺序执行,则使用 suite.addTest(类名("方法名")),如这里按照新增,修改,删除的顺序,可以避免执行完毕后的 阅读全文 »
posted @ 2018-02-03 13:12 忧伤恋上了快乐 编辑
摘要:packagecom.example.tests; import staticorg.junit.Assert.*; import java.util.*; import org.junit.*; import org.openqa.selenium.*;import org.openqa.sele 阅读全文 »
posted @ 2018-02-02 18:22 忧伤恋上了快乐 编辑

点击右上角即可分享
微信分享提示