博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
css selector: xpath:
阅读量:7026 次
发布时间:2019-06-28

本文共 941 字,大约阅读时间需要 3 分钟。

css selector:

$$(".mainLeft>div>h1")

xpath:

$x(".mainLeft>div>h1")

 

name = selectText(".mainLeft>div>h1");

xingzhi = selectText(".comTinyDes>tbody>tr:nth-child(1)>td:nth-child(2)>span");
guimo = selectText(".comTinyDes>tbody>tr:nth-child(2)>td:nth-child(2)>span");
wangzhan = selectText(".comTinyDes>tbody>tr:nth-child(3)>td:nth-child(2)>span");
hangye = selectText(".comTinyDes>tbody>tr:nth-child(4)>td:nth-child(2)>span");
dizhi = selectText(".comTinyDes>tbody>tr:nth-child(5)>td:nth-child(2)>span").replace("查看公司地图","");
jianjie = selectText("div[class=part2]").replace("公司介绍","");

 .css("ul[class=base_info]>li:nth-child(4)")

dizhi:   $$(".lxfs>ul>li:nth-child(1)>font")
youbian:   $$(".lxfs>ul>li:nth-child(2)>font")
lianxiren:   $$(".lxfs>ul>li:nth-child(3)>font")

youxiang:   $$(".lxfs>ul>li:nth-child(4)>font")

dianhua:   $$(".lxfs>ul>li:nth-child(5)>font")

chuanzheng:   $$(".lxfs>ul>li:nth-child(6)>font")

 

 

 CSS selectors for Selenium with example 

转载地址:http://jnoxl.baihongyu.com/

你可能感兴趣的文章
FFT总结
查看>>
cocos2d-x中通过Jni实现Java与C++的互相调用
查看>>
Windows Sysinternals Suite 正式版
查看>>
Navicat 如何进行表单查看
查看>>
Gearman 安装
查看>>
Libgdx学习笔记:封装自己的Actor
查看>>
java中实现多态的机制是什么?
查看>>
sunspot mongo search 步骤和注意事项
查看>>
iBatis的基本实现
查看>>
Data Guard Physical Standby Setup in Oracle Database 11g Release 2
查看>>
5分钟提高Laravel框架性能10倍以上
查看>>
struts2 <s:select 标签手记
查看>>
How to create Multiple Themes/Skins for iphone ...
查看>>
JavaEE——Servlet的Web访问名称
查看>>
JAVA安全模型
查看>>
Spring实战 (三) 装配Bean
查看>>
OC常用代码
查看>>
设计模式--Composite
查看>>
MyBatis自关联查询映射文件
查看>>
maven发布Release版本之maven-release-plugin插件配置
查看>>