1. You only need   from selenium import webdriver .
  2. Execute   html= browser.find_element_by_xpath(".//html")  to get the html element on the page, the largest element. (You can do this any number of ways, and select any number of elements. )
  3. Execute html.text to return the text of the page.

   .text  is a method of an  element  object. Step 2 is the assignment of the  element  to the name  html .

webdriver 选择的更多相关文章

  1. web端自动化——selenium3用法详解

    selenium中文学习文档链接:https://selenium-python-zh.readthedocs.io/en/latest/getting-started.html selenium3+ ...

  2. webdriver下拉框中选择option的方法提醒

    select这个标签比较特殊 下面的option不能用点击下拉框,再点击选中这种方法 前端代码: <html> <body> <select id="Shipp ...

  3. Python3+Selenium3+webdriver学习笔记7(选择多链接的结果、iframe、下拉框)

    #!/usr/bin/env python# -*- coding:utf-8 -*- from selenium import webdriverfrom selenium.webdriver.co ...

  4. webdriver高级应用- 在ajax方式产生的浮动框中,单击选择包含某个关键字的选项

    Ajax简介: Ajax:局部刷新,原理上也是一个js,js调用服务器的远程接口刷新局部页面数据. Ajax = 异步 JavaScript 和 XML(标准通用标记语言的子集). Ajax 是一种用 ...

  5. (java)selenium webdriver学习,选择模块,点击下一页,获取当前url

    selenium webdriver学习,选择模块,点击下一页,获取当前url 查找下一页有多种方法,这里列举两种: isSelected()函数用于判断是否点击选中,返回Boolean类型 impo ...

  6. Python3 Selenium自动化web测试 ==> 第七节 WebDriver高级应用 -- 浮动框中,单击选择某个关键字选项

    学习目的: 了解WebDriver的高级应用 正式步骤: 测试Python3代码 # -*- coding:utf-8 -*- from selenium import webdriver from ...

  7. python webdriver中对不同下拉框通过文本值的选择

    在自动化中python对下拉框的处理网上相对实例比较少,其它前辈写的教程中对下拉也仅仅是相对与教程来说的,比如下面: m=driver.find_element_by_id("Shippin ...

  8. AutoIt实现Webdriver自动化测试文件上传

    在运用WebDriver进行自动化测试时,由于WebDriver自身的限制,对于上传文件时Windows弹出的文件选择窗口无法控制,通过在网上查找资料锁定使用AutoIt来控制文件上传窗口. Auto ...

  9. 手机GUI自动化测试工具选择

    (Graphical User Interface,简称 GUI,又称图形用户接口) 我们需要针对自身产品的需求,从中选取一款合适的工具来实现自动化.对于移动客户端GUI的自动化而言,需要保证选取的工 ...

随机推荐

  1. Sleep Buddies

    Sleep Buddies time limit per test 2.0 s memory limit per test 256 MB input standard input output sta ...

  2. POJ 3026 Borg Maze【BFS+最小生成树】

    链接: http://poj.org/problem?id=3026 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#probl ...

  3. JSP页面中的tab页

    首先下载bootstrap-tab.js和bootstrap.min.css <script type="text/javascript">$('#myTab a'). ...

  4. Django 之 权限系统(组件)

    参考: http://www.cnblogs.com/yuanchenqi/articles/7609586.html

  5. ORACLE中RECORD、VARRAY、TABLE的使用具体解释

     1     说明 1.1       RECORD 定义记录数据类型. 它类似于C语言中的结构数据类型(STRUCTURE).PL/SQL提供了将几个相关的.分离的.基本数据类型的变量组成一个总 ...

  6. mysql执行计划图

  7. 打开一个vue项目

    1.cmd打开命令行工具 2.cd定位到目录 3.(sudo) cnpm install安装((sudo)npm install -g cnpm --registry=http://registry. ...

  8. notepad++运行python代码

    notepad++运行代码 在菜单栏中点击运行或按F5,在弹出的对话框中输入下面命令 cmd /k E:\py3.6\python.exe "$(FULL_CURRENT_PATH)&quo ...

  9. Nginx常用命令(加入系统服务)

    nginx 服务器重启命令,关闭 nginx -s reload :修改配置后重新加载生效 nginx -s reopen :重新打开日志文件 nginx -t -c /path/to/nginx.c ...

  10. 预防SQL注入攻击

    /** * 预防SQL注入攻击 * @param string $value * @return string */ function check_input($value) { // 去除斜杠 if ...