Selenium学习笔记
黎晟的Selenium学习笔记~
_黎晟
Road under foot, heart in distant!
展开
-
Selenium 踩坑(1):打开Chrome debugging模式浏览器崩溃问题
命令行启动Chrome调试模式启动的时候,默认是关闭了调试端口的,如果要对一个目标 Chrome PC 浏览器进行调试,那么启动的时候,可以通过传递参数来开启 Chrome 的调试开关。mac下:sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222windows下:chrome --remote-debugging-port=9222注:1)这里的po原创 2020-07-02 19:47:27 · 12201 阅读 · 2 评论 -
Selenium +Python入门(PageObject思想篇)
PageObject介绍1)2013 Martin Flower 提出2)2015 Selenium 官方加入PO思想PageObject模式Selenium PO 官方总结:总结:1)⽤公共⽅法代表UI所提供的功能2)尽量不要公开页面的内部细节:控件定位逻辑等,只把业务api暴露给用户3)PO⽅法内一般不要加断⾔4)方法返回其他PageObject或返回⽤于断⾔的数据5)不需要建模UI内的所有业务元素6)相同的业务不同的结果,可以建模为不同的⽅法基于POM的⽤例组织结构pag原创 2020-07-07 18:53:59 · 425 阅读 · 0 评论