简体   繁体   中英

How to change path of HTML attribute in Blueprism?

I am reading values of school name from school data from a site. I can get all school name only by changing it's HTML attribute - path

/HTML/BODY(1)/FORM(1)/DIV(5)/DIV(2)/DIV(1)/DIV(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/DIV(6)/TABLE( 1000 )/TBODY(1)/TR(1)/TD(1)/TABLE(2)/TBODY(1)/TR(1)/TD(1)

From above path i want to change 1000 to 1001 or 1002...so that i can get different school name. I can change the path value using calculation and save in data item but how to save that value in original html Attribute path?? click here to see image I want to change path value of SNo

Here's how you do it:

  1. Make the Path of the element as dynamic in application modeler.

在此处输入图片说明

  1. Get the HTML attribute value and store it in the data item (eg Path in the below figure)

在此处输入图片说明

  1. Change the path value - use replace:

在此处输入图片说明

Make the HTML Path as dynamic attribute instead of Equal, select Dynamic Option in application modeller. Then you can pass the required html path as an input at run time.

Open Application modeller set the Xpath as Dynamic instead of equal open navigate and add the element and from parameter add the path between "" and remove the changable part and add your variable like this "/HTML[1]/BODY[1]/DIV[4]/DIV[1]/DIV[1]/DIV[1]/UL["&[Counter]&"]/LI[8]/A[1]"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM