Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Window Name and Windows application
#1
Solved: 11 Years, 4 Months ago
Hi All...
Iam new to QTP and this is my first recorded code .
After recording and modifying the code little bit .I modified the code littlebit bcas the window names changes for every run.
Please help me...thx

Satya

The Actual Recorded Code is :
Code:
Window("SLIM - [Study '10-P-746' Event Log]").WinMenu("Menu").Select "File;Print...    Ctrl+P"


the Modified code is
Code:
Var = Window("ForeGround:=True").GetROProperty("regexpwndtitle")
Set oWindow = Description.Create()
oWindow("regexpwndtitle").Value =Var
msgbox Var

Window("regexpwndtitle:="& Var).WinMenu("Menu").Select "File;Print...    Ctrl+P"


The Error iam getting is:::::::::::>
The "Menu" object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.

Line (49):
Code:
"Window("regexpwndtitle:="& Var).WinMenu("Menu").Select "File;Print...    Ctrl+P"".
Reply
#2
Solved: 11 Years, 4 Months ago
Hi
Use regular expression
Code:
Window("regexpwndtitle:= SLIM.*").WinMenu("Menu").Select "File;Print...    Ctrl+P"

I dont understand why you are using the property "ForeGround" to get the regexpwndtitle of the window... instead try this

Code:
Window("ForeGround:=True").WinMenu("Menu").Select "File;Print...    Ctrl+P"

Let me know is the above code works..

-Vinod
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 1,096 02-13-2020, 07:34 PM
Last Post: RamUFT
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 6,027 06-06-2017, 11:12 AM
Last Post: workrohit08
  Parametrization for dynamic Power Builder application qtptester17 0 1,650 10-26-2016, 02:55 AM
Last Post: qtptester17
  Script is not generated for windows application in UFT sreelatha 1 2,376 04-04-2016, 10:51 AM
Last Post: vinod123
  Is it possible to call Java window and Power Builder Window in 1 Action sbkhbk 0 2,537 06-05-2014, 08:18 PM
Last Post: sbkhbk

Forum Jump:


Users browsing this thread: 1 Guest(s)