Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I specify an object with a randomly generated name?
#1
Solved: 10 Years, 10 Months, 1 Week ago
Hi,

What I'm trying to do is:

Code:
Dialog("Mywindow,  Provider ID = 762222,  Track ID = AAAA").WinButton("text:=New").Click

The problem is that Track ID is randomly generated each time, so it can not be found in the OR.

Then I read that properties are regular expressions, so I tried:

Code:
Dialog("text:=Mywindow,  Provider ID = 762222,  Track ID = ????").WinButton("text:=New").Click

And it couldn't find that either. (did I do my regexp wrong? Why didn't this work?)

Then I read that RegExpWndTitle is, 'The constant part of the window title.'

So I tried,

Code:
Dialog("RegExpWndTitle := Mywindow,  Provider ID = 762222,  Track ID =").WinButton("text:=New").Click

Because that is the constant part, right?

And that didn't work either. (Why not?)

So is there a way to fix one of my two attempts above, or is there a different method I should be using?

Thanks for any ideas,

Random
Reply


Messages In This Thread
How do I specify an object with a randomly generated name? - by RandomGrin - 12-27-2012, 02:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT issues with Outsystems dynamically generated Id/names jherron 2 1,157 03-02-2020, 09:33 PM
Last Post: Swishy70
  Test runned from QualityCenter generated an error "Attempted to divide by zero." robertosalemi 1 2,392 10-14-2016, 08:38 PM
Last Post: robertosalemi
  Script is not generated for windows application in UFT sreelatha 1 2,188 04-04-2016, 10:51 AM
Last Post: vinod123
  Save randomly generated string SomeIntern 1 2,250 08-27-2013, 12:36 AM
Last Post: SomeIntern
  QTP does not recognise elements randomly Pkapoor 2 2,520 07-05-2013, 11:27 AM
Last Post: Pkapoor

Forum Jump:


Users browsing this thread: 1 Guest(s)