Detect that a PDF document displayed in page

Ranorex Spy, Recorder, and Studio.
Zee357
Posts: 8
Joined: Tue Jan 05, 2016 7:43 pm

Detect that a PDF document displayed in page

Post by Zee357 » Wed Jan 27, 2016 8:47 pm

I have a link that navigates to a PDF file within the browser. How do I validate the page as PDF document [displayed]?

It does show the .PDF in the browser address toolbar:

http://Orgname.org/education/partners/2 ... elines.pdf

The script code is what I'm looking for. Not sure what repository items I'm dealing with as well.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Detect that a PDF document displayed in page

Post by Support Team » Thu Jan 28, 2016 12:51 pm

Hello Zee357,

In order to validate the address bar, simply track the bar and add it to your repository. The repository element should contain the entered URL within its "text"-attribute. Please use the following recording action in order to validate the mentioned attribute:
AtrributeRegEx.png
AtrributeRegEx.png (29.71 KiB) Viewed 671 times
Used regex: ".*.pdf" matches all PDF files/URLs

Hope this helps.

Sincerely,
Robert
.
Image