想要在机器人框架中获取属性的值 [英] Want to fetch value of an attribute in robot framework

查看:48
本文介绍了想要在机器人框架中获取属性的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 xpath 下面获取 aria-expanded 的值//div[@id='contact-information']//div[@aria-expanded='false']

I want to fetch the value of aria-expanded from below xpath //div[@id='contact-information']//div[@aria-expanded='false']

我应该使用哪个关键字?

Which keyword should I use ?

推荐答案

Selenium2Library.Get Element Attribute 应该可以解决问题.

Selenium2Library.Get Element Attribute should do the trick.

http://robotframework.org/Selenium2Library/doc/Selenium2Library.html#Get%20Element%20Attribute

示例:获取元素属性//div[@id='contact-information']//div[@aria-expanded='false']@aria-expanded

example: Get Element Attribute //div[@id='contact-information']//div[@aria-expanded='false']@aria-expanded

这篇关于想要在机器人框架中获取属性的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆