Question
Freelancer
IN
Last activity: 14 Jun 2017 8:26 EDT
Not Able to download Multiple PDF from a webpage in openspan
Hi All
I have mutiple Unique ID in an Excel , Iam trying to login into site and trying to download multiple PDF which is in a table format.
Iam able to download only one PDF where s i have to download multiple PDF.
Count of PDF Link will be different for each ID.
Can anybody help.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
ANZ
IN
Hi,
Can you share the screen shot of the page. Mostly if you pass an index to the control you can download multiple files by using a for loop.
Freelancer
IN
Hi
Iam passing index using Script but not able to go in other link.
getting error as could not find instance from key provider, key provider:table section
Below is the format which we are getting in webpage
we have to download the Link .Pdf from column Link in a folder
same applies to every ID
Sr No |
Desc |
Link |
Uplod |
1 |
saasda |
|
|
2 |
sdasd |
Links to download.pdf |
|
3 |
sdas |
|
|
Hi
Iam passing index using Script but not able to go in other link.
getting error as could not find instance from key provider, key provider:table section
Below is the format which we are getting in webpage
we have to download the Link .Pdf from column Link in a folder
same applies to every ID
Sr No |
Desc |
Link |
Uplod |
1 |
saasda |
|
|
2 |
sdasd |
Links to download.pdf |
|
3 |
sdas |
|
|
4 |
sdas |
Links to download.pdf |
|
5 |
sadasda |
Links to download.pdf |
|
6 |
sadasdsad |
|
|
7 |
sadas |
Links to download.pdf |
|
Pegasystems Inc.
US
If you are using the HTML Table Designer, then you can interrogate the link to the PDF beneath the table section. To do that;
- Interrogate the HTML table and create the section(s) that you need.
- Interrogate any cells you need to read data from.
- Close the HTML Table Designer (saving your design).
- Interrogate the hyperlink (or whatever control you click to download the PDF).
- It should appear underneath your table section.
- Make sure you adjust the match rule for the control to allow it to match on every row where it is present.
- Now when you iterate through each row, check IsCreated on the PDF link before you click it, since it appears as though it isn't always present.
Freelancer
IN
Hi Sir
Thank you for your quick reply...
but i have not understood Point number 6 and 7 please can you Elaborate.
Rest all I have done.
Thanks.
Pegasystems Inc.
US
For point number 6, if the match rule for the control is specific to only the instance for the first row, then it will not match on subsequent rows. For example; if the ElementID were something like "downloadLink1" (where 1 is the row number) and you were using that as the match rule, then it would not match on subsequent rows.
For number 7, you would add a check to IsCreated into your table iteration. I've attached the first example I could find, although I am not checking IsCreated, but you can get the point.
Freelancer
IN
Hi sir
Number 6 How will i set the match rule for different multiple link download.
Number 7 we are doing the same as you have given but showing the error as Could not found instance from key provider, Table section3.
Sorry to Distrub You Please Help.
Pegasystems Inc.
US
For number 6, you need to make the match rule generic enough such that it works for every instance of the link. Basically, identify what is common about the link on each row and make sure that your match rule within your HTML table is setup to match each one.
For item number 7, it sounds like you are not checking to see if the link IsCreated property is True. I believe this will return True or throw an Exception rather than return false. You will want to wrap it in a Try...Catch. You can also right-click it and select "Handle KeyNotFound Exception"
Freelancer
IN
Hi Sir
For Number 6 their is nothing common in each link on each row. some links are .pdf , .msg , .7z , .dox etc.
so iam not able to set a match rule
And some link shows message box as open save or cancel after clicking.
some gets directly opens.
But i have one idea if that Link Column contains any value means not equal to zero that means there will be some link to be clicked, then perform click that value. Is that one thing possible .
If possible then please guide how i can achieve that.
And i should able to perform for each row in the Link Column.
Please suggest and help to overcome from this issue
Thanks Sir
Maneesh.
Pegasystems Inc.
US
Set the match rule for point number 6 to match anything that is there. I usually use a Inner Text match rule with type of Regex and set the criteria to a dot. Use the contents of the cell then to determine the type - for instance if it ends with .pdf you know it will download a pdf. Based on the type you can then add your handling based on what you expect from that type.