List Icon
Mailing list Archive

2019 up to July 2022 | 20182017  |  2016  2015 2014 | 2013

The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
But if you want to stay informed about news about QF-Test, you can simply
Subscribe to Newsletter  

To get up-to-date information about each release - including minor releases - you can
subscribe to the RSS feed or follow us on social media.
Alternatively, QF-Test also provides release information itself.

Another source of information is our blog, where there are current articles on general topics, on the company QFS and also various "how-tos"
subscribe to blog


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] PDF in web browser - saveAsText


  • Subject: Re: [QF-Test] PDF in web browser - saveAsText
  • From: Nedvěd, Marek <m.nedved@?.de>
  • Date: Fri, 4 Sep 2015 12:58:27 +0000

Hello Thomas,

 

I am running Windows 7 64bit, QF-Test version 4.0.7 and Adobe Acrobat Reader XI version 11.0.12

I have upgraded the acrobat to DC version 2015.008.20082 and I was still unable to save the page with save PDF or saveAsText.

Maybe I was doing something wrong:

I started the Internet Explorer browser with url  of the pdf file. Then I called procedure qfs.autowin.acrobat.savePDF with following parameters:

filename:             C:\work\seite.pdf

Title:      Browser-Fenster – Dokument Name - Windows Internet Explorer

titleRegexp:       false

dialogTitle:          Speichern unter.*|Save .s.*|Save a Copy.*|Kopie speichern.*

timeout:              30000

overwriteExistingFile:    false

windowtimer:   30000

savetimer:          3

inlineDisplay:     false

 

That didn’t work, it just threw UserException "Cannot find an open Adobe Reader window".

 

Then I started playing with the savePDF script and figured out, what was possibly wrong – the function findInlinePDFWindow.

In this method the expected window class is “wxWindowNR” but on my system it is “wxWindowClassNR”. Other problem is that the following condition for the window name checks only empty string. When I changed it, it started to work.

 

This is the new method:

 

def findInlinePDFWindow():

    wins = Wnd.getAllWindows()

    for w in wins:

        cname = w.getWindowClassName();

        if w.isVisible() and cname=="wxWindowClassNR":

            wname = w.getWindowText()

            title = rc.lookup("title")

            regTitle = re.compile(title)

            if regTitle.match(wname):

                childs = Wnd.getChildWindows(w)

                for c in childs:        

                    cText = c.getWindowText()

                    name = ".*Adobe.*Reader.*"

                    reg = re.compile(name)

                    if reg.match(cText):

                        window = c

                        return window

 

It would be nice to fix this in a next patch and also improve the SaveAsText function to accept the “inlineDisplay” parameter.

 

Cheers Marek