cancel
Showing results for 
Search instead for 
Did you mean: 

Extract HTML Attribute

Stephen
Level 3
Hi BP Community, I am having trouble using the "Get HTML Attribute" feature of the read action. When I use "Get HTML" I capture the follow snippet and the list of attributes continue on and on. When I inset "class" into the input field for the "Get HTML Attribute" action, I get a "identifier class of type html not found". Needless to say, I also get this for all the other attributes. When I change the "class" to "div" I get "identifier div of type html not found". Am I using the Get HTML Attribute feature wrong? Can I extract the above attributes in BP without code or do I need to code a solution? Thanks!
4 REPLIES 4

GintautasAnduzi
Level 2
*reposting my deleted comment* I might not be correct, but i'm kinda suspicious regarding this particular div class and your received error. It is a nested class. In your particular case, it consists of 3 classes - listing, listing-search, listind-data . So due to this, maybe BP is having some difficulties (I wouldn't be surprised). I suppose your best bet would be to get the path of that element i.e. html/body(1)/div(x)/... (you can do it manualy yourself as well), on top of that checking for ID would be helpful as well.

John__Carter
Staff
Staff
I think with Get HTML Attribute you need to use the name of an attribute from the Application Modeller list.

Stephen
Level 3
I have tried using the path. Ideally I would like to have it use a wildcard path value so that it is not crawling through the entire code trying to find a value by class name and match index. That's how I am doing things right now. The performance is terribly slow. When I use this approach however, I am unable to find the elementsl. This is with a * after the grandparent div tag. Is this possible? How do i do it?

Anonymous
Not applicable
Yes John Carter is correct.