selenium=使用docker搭建selenium测试环境
摘要:目的:本地编写测试代码,运行时,在远程主机运行 本地环境:win10 远程主机:CentOS Linux release 7.2.1511 (Core) [root@node129 /]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (
阅读全文
posted @
2020-10-10 17:30
li7
阅读(643)
推荐(0)
selenium-codeMirror代码编辑器,如何定位并在编辑区域输入内容
摘要:背景: 使用selenium driver api 不能对定位到的元素进行操作 解决方案 #向codeMirror代码编辑器中填写代码,该xpath应为包含codemirror整体的类的xpath,不可以是各个细分codemirror组件的xpath 示例代码 1 def demo(self, co
阅读全文
posted @
2020-09-08 17:31
li7
阅读(912)
推荐(0)
selenium-SVG 嵌入HTML,如何定位元素
摘要:背景,html中嵌入了SVG,定位元素时,不能定位到。图表上的元素来自SVG-namespace,因此您不能使用通用语法来选择这些元素(您将无法通过其标签名称选择元素,例如//svg或//path,等等) SVG 意为可缩放矢量图形(Scalable Vector Graphics)。SVG 使用
阅读全文
posted @
2020-09-08 17:21
li7
阅读(1150)
推荐(0)
python selenium鼠标键盘操作(ActionChains)
摘要:目录 1.ActionChains基本用法 链式写法 分步写法 2.ActionChains方法列表 3.代码示例 1.点击操作 2.鼠标移动 3.拖拽 4.按键 示例1: 示例2: 用selenium做自动化,有时候会遇到需要模拟鼠标操作才能进行的情况,比如单击、双击、点击鼠标右键、拖拽等等。而s
阅读全文
posted @
2020-09-08 17:00
li7
阅读(1073)
推荐(0)
selenium之BasePage封装
摘要:import logging import time from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.we
阅读全文
posted @
2020-03-25 15:20
li7
阅读(1074)
推荐(0)