Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Querying Photon widget contents from a seperate process: (2 Items)
   
Querying Photon widget contents from a seperate process  
Hi

One of our customers has expressed a desire to perform some automated testing on their QNX / Photon based system.

Ideally they want to be able to query the Photon server for the 'widgets' currently on screen and to then query those 
widgets for their content.  They want to be able to do this out of process using a bespoke test application on the 
released software.

Looking through the QNX documentation it's not immediately clear how we could do this or if it's even possible.  An in 
process solution would be able to use the PtGetResource interface to query known widgets for their contents but as I say
 they want to use a completely separate test application.

Are there any such interfaces provided by the Photon libraries that we could use?

Thanks
Ed
Re: Querying Photon widget contents from a seperate process  
There's no easy way to do this.  The Photon server doesn't know about widgets -- it knows about windows and regions 
inside windows, but most widgets don't create a region, and those that do, don't associate much information with their 
region that could identify the widget (let alone query its resources).  Widgets are really just data structures in 
memory that dictate the Photon library how to deal with mouse clicks, key presses, drawing, and so on; they can't be 
accessed from the outside of the process that owns them.

Your best bet is to invent a messaging interface to allow the test application to query the other application.  The best
 way to do it in Photon apps is by using the PtConnectorCreate() stuff.  But this just gives you a way for the two 
processes to send messages to each other -- what to put in the messages is entirely up to you.