Close PDF file or Document

Ask general questions here.
swainpabitra
Posts: 13
Joined: Thu Dec 04, 2014 5:21 pm

Close PDF file or Document

Post by swainpabitra » Mon Apr 27, 2015 5:19 pm

Hi Support Team,
I am using Ranorex 5.2 Tool.
I have dynamic reports with different titles in PDF formats.
So when i run test cases then it finds the specific PDF file name.
So, My question is that how i will apply or call close button in dynamic PDF files?

Thank You.
PabitraKumar Swain

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Close PDF file or Document

Post by odklizec » Tue Apr 28, 2015 7:25 am

Hi,

If you don't know what title will be displayed in the PDF viewer, then you will have to use another attribute to identify that PDF viewer (e.g. processname, app name, etc.) and use "Close Application" action to close the PDF viewer. Hope this helps.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

swainpabitra
Posts: 13
Joined: Thu Dec 04, 2014 5:21 pm

Re: Close PDF file or Document

Post by swainpabitra » Tue Apr 28, 2015 4:06 pm

Hi,
Thanks for your Support.
I have done it with in different way.
Thanks again.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Close PDF file or Document

Post by odklizec » Wed Apr 29, 2015 7:23 am

Hi,

Nice to hear you found another way. Any chance you could explain how did you solve it? You see, your solution may help other people with similar problem ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

swainpabitra
Posts: 13
Joined: Thu Dec 04, 2014 5:21 pm

Re: Close PDF file or Document

Post by swainpabitra » Sat May 09, 2015 9:08 am

Hello odklizec,

Sorry i was out of town.
Yes,
In my Application i want only close PDF file which was generated by some criteria.
So first i find out common name of PDF file on title bar, like .PDF extension.
Because rest of name is created dynamically.
Then i call close button click event from repository.
if i use process name or app name then it will close rest PDF files that are opened.

Hope you understood. :D

Thank you.
Pabitrakumar Swain