Posts: 4
Threads: 2
Joined: Jun 2009
Reputation:
0
06-29-2009, 07:41 PM
Hi All,
The title of the main window in my application is dynamic so I have been trying to use a regular expression in the the OR's description without any success. To make the problem as simple as possible I created a text file calle - "Testing QTP 95.txt"
The description properties in the Object Repository is:
text: Testing QTP 95.txt Notepad
I have tried to change it to: Testing Q*P 95.txt Notepad
and - Testing Q+P 95.txt Notepad
and - Testing Q?P 95.txt Notepad
None of these work, can anybody explain why, Are you not able to do that?
Thanks, Paul
Posts: 33
Threads: 2
Joined: Oct 2008
Reputation:
0
07-24-2009, 12:20 AM
Are you trying to log into/activate the application or just needing to modify objects/fields within the application once it is opened?
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-13-2009, 11:55 AM
If your question is mere regular expressioning a text then there are several patterns which you can use. The simplest one would be like,
Testing QTP.* - this will ignore all the charachters after QTP. In other words any window with the title begining as "Testing QTP" will be identified.
Was this what you were looking at ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 4
Threads: 2
Joined: Jun 2009
Reputation:
0
08-13-2009, 06:59 PM
I would love it if I could do that but the title is so complex that for whatever reason QTP cannot recognize it(or maybe there is another reason for that). The Main Window of my app is identified through regexpwndtitle =
"Application 1 Core v4.0 [ 3.022.013C ]. Logged in as 'USER1' QA ENV"
There are 3 different places in that name that are variable.
Even using regular expressions to do the following is not recognized.
"Application 1 Core v4\.0 \[ 3\.022\.013C \]\. Logged in as 'USER1' QA *"
Since this is the main window in which all other objects reside in using Descriptive programming is unrealistic. I resolved the problem by getting the object name using the WIN API Function FindWindow to get the current name and then SetTOProperty to name it correctly. That seems to work without problem. Thanks,
.......
Posts: 1
Threads: 0
Joined: Sep 2009
Reputation:
0
09-16-2009, 12:09 PM
What is the regular expression for the "Static" object in which text string "Its a page which can not appear OR if it appear than the window size should be 1024X850."?
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
09-16-2009, 01:05 PM
It seems your query is quite different from the original query of this thread.
You should open a new thread for your question with more details describing the issue.