Skip navigation.
Home
The QNX Community Portal

View topic - GUI Automation

GUI Automation

Isn't the name clear?

GUI Automation

Postby sheran.vaz » Wed Jun 08, 2011 1:46 pm

Any suggestions on how i can recognise the screens being dsplayed currently, based on which i can take decisions as to what i should do next.
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

RE: GUI Automation

Postby maschoen » Wed Jun 08, 2011 6:03 pm

Huh?

So what do you mean by "screens being displayed currently"? Do you mean where in the Photon space your display is looking? Or do you mean which windows are visible? You might want to check out the "phin" program.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Postby sheran.vaz » Wed Jun 15, 2011 8:08 am

Sorry for the Delayed response. :oops:

Assume I have a Popup which can display different Messages.
How can i recognise what Msg is being displayed at a given instant?
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

Postby maschoen » Wed Jun 15, 2011 11:34 am

You need to give a little bit more context to your question.
Are you talking about a person making a decision or a computer?

Are you talking about trying to read a graphic on the screen and figure out what the words are and what they mean?
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Postby sheran.vaz » Wed Jun 15, 2011 11:39 am

correct.. reading the graphic from a screen, beased on which a computer will be taking decisions.
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

Postby maschoen » Wed Jun 15, 2011 11:48 am

You didn't say which version of QNX you are using. Interestingly I've been dealing with a change from 6.3.2 where the documentation describes how to do this correctly, and 6.4/6.5 where it doesn't. I just received the source code to snapshot to figure this out. You could use the delivered snapshot to grab the graphic on the screen.

How does one interpret the graphic? This is a question outside of QNX. Once a graphic is rendered on the screen, unless you have a way to extract the original ASCII information from a program you are probably SOL.

One might ask how one gets to this question in the first place. Did someone else write the program, and you somehow able to read the graphic screen, but not talk more intimately with the program?
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Postby sheran.vaz » Wed Jun 15, 2011 12:18 pm

I'm working with QNX 6.2..

How do i get this snapshot of the graphic being displayed?

I was thinking if i could create a Region(sensitive to draw events) in the Photon Event space and tap the draw events sent from my GUI Appln to the Graphic driver. Is it possible?
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

Postby maschoen » Wed Jun 15, 2011 6:43 pm

I think you misunderstand what a draw event is. The draw event of graphic text consists of a blit to the screen of a graphic that was created with the font manager. There's no text at that point. I don't know if 6.2 supports snapshot. In 6.3 it is a utility you can find on the shelf menu.

Mitchell
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Postby sheran.vaz » Tue Jun 28, 2011 2:42 pm

I do understand the draw events do not contain the actual text.

I decided to get some state info from my application under test rather than recognising the screen being displayed.

Also in QNX 6.2.0 the snapshot utility has fewer options, it requires human intervention to choose the area that is to be captured. I wont be able to script it.
sheran.vaz
Active Member
 
Posts: 98
Joined: Mon May 11, 2009 9:17 am

Postby maschoen » Tue Jun 28, 2011 5:37 pm

The photon routine to read the screen FOr QNX 6.3 is PgReadScreen(). I think it was the same in QNX 6.2 but you will need to check the documentation. It has limitations, for example you can only read a part of the screen
that is actually showing. I don't know what good this will do you as you will have to interpret graphical information, which is
at best hard.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest