[Ride][RF]Robotframework如何获取输入框输入后的字符value,获取输入框输入后的文本内容(第四篇)


获取元素text的时候,经常会遇到获取 input 元素类型的文本内容,有时候经常看不见输入的字符的内容,这时候需要获取输入后的内容很难获取到,以下有两种方法能获取到能输入字符的方法,亲测

在这里插入图片描述



在这里插入图片描述

=
方法1:
${pos} get value //input[@id=“posName”]

=
方法2:
${posn} get element attribute //input[@id=“posName”] value



在这里插入图片描述





正常获取文本字符
get text
就可以








官方文档: Name: **Get Value** [返回定位器标识的元素的值属性。 有关定位器语法的详细信息,请参阅“定位元素”部分。] Source: Selenium2Library Arguments: [ locator ] Returns the value attribute of element identified by locator. See the `Locating elements` section for details about the locator syntax.

Name:
Get Element Attribute
[使用显式属性参数。]
Source:
Selenium2Library
Arguments:
[ locator | attribute=None ]
Returns value of attribute from element locator.
See the Locating elements section for details about the locator syntax.
Example:
在这里插入图片描述

Passing attribute name as part of the locator is deprecated since Selenium2Library 3.0. The explicit attribute argument should be used instead.


在这里插入图片描述



有什么疑问可以私聊讨论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值