Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regular expression on Window object
#1
QTP 11.
Window 7 64Bit.
I have an object which has text is "User Promoted Notification Area" (this is system tray area)
I tried to regular express the object with their text because of that object will be different on WinXP (e.g: Notification Area)

What I tried:
?Notification Area
.*Notification Area
+Notification Area
$Notification Are
Notification Are$

But the object can not be found. (even on Object Repository Identified or Runtime)

Please help!!
Reply
#2
Try as

*Notification Area
Reply
#3
I tried but it does not work too.

I tried this case:
.*Notification Area
--> Now error is it is not unique then I have to defined "Ordinal Identifier" = "Index, 0)

Problem now,
Unexpected error when: Window("Window").WinToolbar("Notification Area").GetItemsCount
Reply
#4
post your complete code. Let us also know what are you trying to achieve.
Reply
#5
@Ankesh,

It is simply,
1. I wanna get the list of running program icon on SystemTray.
2. Get the position.
3. Click on it.

NOTE: The problem only happens on Win7 (my current working station is 64Bit)

Here is my sorted code:
Code:
nItems = Window(objWindow).WinToolbar(Notification Area).GetItemsCount For nItem = 1 To nItems 'Get Name sItemName = Window(objWindow).WinToolbar(Notification Area).GetItem(nItem) If sItemName = strAppName Then ' if the name is required Application x = Window(objWindow).WinToolbar(Notification Area).GetROProperty("abs_x") y = Window(objWindow).WinToolbar(Notification Area).GetROProperty("abs_y") objWidth = Window(objWindow).WinToolbar(Notification Area).GetROProperty("width") ApproxIconWidth = objWidth / nItems '' ApproxIconWidth = TotalWidth / Total items count objX =(ApproxIconWidth * nItem - 1) ''Formula used - ApproxIconWidth * ItemNumber - Gutter (i.e. space between two icons - Let gutter = 1) Window(objWindow).WinToolbar(Notification Area).DblClick objX,2,micLeftBtn 'Double left click on icon End If Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 4,059 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,801 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 4,387 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 17,091 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,453 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)