Ask a Question

How to get an attribute value from Object property

Raviavi
Occasional Contributor

How to get an attribute value from Object property

Hi All, 

 

I have an object which has a property called "InnerHTML" whose values is like <apux-tooltip tooltip="Help" placement="bottom-right"><apux-icon icon-name="help-circle-2" icon-size="medium"></apux-icon></apux-tooltip>

 

I would like to get the "Help" from this above inner html

 

How do i do that? Please suggest

Raviavi_0-1652810888314.png

 

4 REPLIES 4
npaisley
Staff

Hi @Raviavi!

 

We map the 'innerHTML' property for objects so you can absolutely retrieve that and use it wherever you like, such as setting a variable value with an objects innerHTML property. 

 

The below document explains how to retrieve and assign object properties;

https://support.smartbear.com/testcomplete/docs/keyword-testing/basic/property-values.html

 

Can you tell us what you would like to do with the property once it is retrieved? This may help to guide you to a bit more solid solution.


Regards,
Nick

Solutions Engineer @ SmartBear
Raviavi
Occasional Contributor

I actually need to read each attribute value from innerhtml property after retriving from object..
RoughtonR
New Contributor

Great article! I realized these are my favorite kinds of GI articles. Enough news and reviews, more stuff like this! Let the writers get creative!

 

Wyndham Rewards Login

Kaley5
New Contributor

The getattr() function returns the value of the specified attribute from the specified object.
 
cancel
Showing results for 
Search instead for 
Did you mean: