Detect that a PDF document displayed in page

Ranorex Studio, Spy, Recorder, and Driver.
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: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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
Used regex: ".*.pdf" matches all PDF files/URLs

Hope this helps.

Sincerely,
Robert
You do not have the required permissions to view the files attached to this post.