Store text/Get text and store in a variable

If you look closely at the description of ‘Get Text’ keyword: “Get the visible (i.e. not hidden by CSS) inner text of the web element, including sub-elements, without any leading or trailing white space.”

So I believe the displayed text from your object is not a visible inner text. You can see my example below: username’s field value is actually displayed by ‘value’ attribute of its

You should use ‘Get Attribute’ instead, like this:

text = WebUI.getAttribute(findTestObject('Page_CuraHomepage/btn_MakeAppointment'), 'value')

Screen Shot 2018-03-15 at 14.53.01.png

2 Likes