Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2014


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

Re: [QF-Test] How to get QFTest to shift focus to new window?


  • Subject: Re: [QF-Test] How to get QFTest to shift focus to new window?
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Mon, 29 Dec 2014 10:21:26 +0100


Hi Rick,

That's an interesting question. QF-Test can handle this situation, but
the solution is not obvious. Please read and follow the insructions
below carefully and get back to our support in case you get stuck.


First, I presume that when you record interactions with the main
window and with the popup windows, all components end up in the same
'Window' (or Website) node under 'Windows and components'. If that is
not the case, modify the 'Feature' attribute of the 'Window' node for
the main window and set it to a regular expression that matches all of
the windows. Use .* if necessary. Delete all other 'Window' nodes.

Next, set the attribute 'Name of the browser window' of the remaining
'Window' node to

${default:window:}

This means, that this attribute has the value $(window) if the
variable "window" is defined and is empty - the default - if the
variable "window" is undefined.

Now you can address different browser Windows by setting different
values for the "window" variable.

The main question remaims: How do you know, wich value to set?

The main window gets its name from the'Name of the browser window'
attribute of the 'Start browser' node that opens it. You can leave it
empty and thus address the main window by not defining the "window"
variable or by setting it to an empty value.

All subsequent popup windows get their name assigned by the 'Wait for
document to load' node, that gets recorded along with the mouse click
that opens this window and that is needed for synchronization.

So, when recording a menu item selection in the main window that opens
a new popup window, the first thing to do is edit the recorded 'Wait
for document to load' node and set its 'Name of the browser window'
attribute to a unique value that corresponds to the function of that
window, i.e. the specific menu item that you selected in the main
window.

The value you assign here is the value you have to define for the
"window" variable during replay in order to interact with this
specific window. One way to do that is to place event, check and other
nodes that belong together and work on a single window in a
'Test-step' or 'Sequence' node and define the "window" variable for
that 'Test-step' or 'Sequence'. Also, common 'Procedures' with a
"window" parameter are a very good choice as well.

Hope that helps.

Best regards,
    Greg


Rick Brasche <Rick.Brasche@?.org> writes:

> Hello all:
>
> We’ve received a project request to interact with a web application run by an outside entity.
>
> The first challenge we’ve encountered is how the web app is used. We can log in to the browser
> just fine, and get to the starting menu.
>
> But each menu item, when selected, opens a brand new window (In Firefox and Internet Explorer it
> manifests as a new tab) and all interaction from that point happens in this new window.
>
> How do we get QFTest to start the browser, run the login script, then automatically move to the
> new window and work within that? Treating the new tab like a popup window doesn’t seem to be
> working.
>
> Can QFTest follow the Windows focus?
>
> Thanks in advance for any advice or experience you can share.
>
> Rick Brasche,
>
> Information Systems Business Process and Data Entry Automation
>
> Home of Application Testing
>
> ------------------------------------------------------------------------------------------------------------------------------
>
> “The difficult we do immediately, the impossible just takes a bit longer.” – US Navy SeaBees.
>
> “If it ain’t broke, you’re not trying hard enough.” – “the Red Green Show”
>
> NOTICE: This email message and/or its attachments may contain
> information that is confidential or restricted. It is intended only for
> the individuals named as recipients in the message. If you are NOT an
> authorized recipient, you are prohibited from using, delivering,
> distributing, printing, copying, or disclosing the message or content to
> others and must delete the message from your computer. If you have
> received this message in error, please notify the sender by return
> email.
>
> _______________________________________________
> qftest-list mailing list
> qftest-list@?.de
> http://www.qfs.de/mailman/listinfo/qftest-list

--
Gregor Schmid

E: gregor.schmid@?.de
T: +49 (0)8171 38648-11
F: +49 (0)8171 38648-16

Quality First Software GmbH | www.qfs.de
Tulpenstr. 41 | 82538 Geretsried | Germany
GF Gregor Schmid, Karlheinz Kellerer
HRB München 140833

Videos Downloads Documentation Buy Free Trial