cancel
Showing results for 
Search instead for 
Did you mean: 

How can we use attribute name and value in finding element

AmitPatnaik
Level 4
This is my xpath :  //div[@id='noSearchBody' and @style='display: block;'] I want to use display attribute for finding the element  
5 REPLIES 5

John__Carter
Staff
Staff
Can you not just tick the attribute in Application Modeller? And if you don't want to hardcode a value, mark the attribute as Dynamic supply the value from the diagram.

DavidEdwards-Da
Level 5
Display isn't an element attribute though - it's a CSS property. Blue Prism doesn't currently support using CSS selectors, something you can do is inject javascript into the page to manipulate the element (something I do a lot is inject the Sizzle library if jQuery not used on the page to make selecting elements easier). Or, seeing as how your element has an id, just use that in the Application Modeller?

AmitPatnaik
Level 4
John -  I will try to explain my scenario  Name         | version Blue prism  | 6.2 I want to find the value depending on the name because the table appears in different section of the page for each entry This we can do that in Xpath using text() function //td[text()='Name']//..//..//tr[2]/td[3]   So can we do this in blue prism?

AmitPatnaik
Level 4
David -  Is there any document where I can get the reference how to do this objective?   Blue Prism doesn't currently support using CSS selectors, something you can do is inject javascript into the page to manipulate the element (something I do a lot is inject the Sizzle library if jQuery not used on the page to make selecting elements easier).

MelissaSuarez_G
Level 6
A general description of how to use JavaScript with Blue Prism can be found on the Browser Automation Guide: https://portal.blueprism.com/system/files/2017-09/Browser%20Automation%20Guide_0.pdf