The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> AutomatedQA / SmartBear TestComplete

Pages: 1
cconfusionn
Newbie


Reged: 09/04/09
Posts: 18
WaitProperty
      #597938 - 10/22/09 12:36 PM

Hello everyone,

I ran into an issue when running a test. I used WaitProperty method and here's my line of code:

Code:

Set frmFinished = Aliases.TFSGetLatest.Finished.cl_Finished
Call frmFinished.WaitProperty("Exists", True, -1)
Log.message("finished")



I thought when I used -1 that will keep waiting until my Finished Window appear, However the test just went ahead and continue.

Please help me.

Thanks,
Long


Post Extras: Print Post   Remind Me!   Notify Moderator  
Allen_AQA
Active Member


Reged: 07/02/08
Posts: 1053
Re: WaitProperty [Re: cconfusionn]
      #598003 - 10/23/09 01:26 AM

Hi Long,

I strongly recommend that you use the WaitAliasChild method instead (see the "WaitAliasChild Method" help topic for more information). Besides that, I recommend that you avoid specifying -1 as the timeout value because this can make your script hang (that is, wait infinitely) if the object never appears. I recommend that you use a 5-30 second timeout depending on your application's performance.

--------------------
Regards,
Allen - SmartBear Support


Post Extras: Print Post   Remind Me!   Notify Moderator  
Robert MartinModerator
Super Member


Reged: 03/22/06
Posts: 1836
Loc: Pennsylvania, USA
Re: WaitProperty [Re: cconfusionn]
      #598029 - 10/23/09 04:34 AM

I honestly don't like using the "Exists" property in any way outside of the Wait functions like WaitAliasChild, WaitChild, WaitVCLObject, etc. I would re-write your code above as

Code:

Set frmFinished = Aliases.TFSGetLatest.Finished
if frmFinished.WaitAliasChild("cl_Finished", 30000).Exists then Log.message("finished")



Forgive syntax errors as I'm not versed in VBScript.

--------------------
-Robert Martin
Automated Testing Evangelists
TestComplete "expert"
Definition expert - noun - Unknown drip under pressure


Post Extras: Print Post   Remind Me!   Notify Moderator  
cconfusionn
Newbie


Reged: 09/04/09
Posts: 18
Re: WaitProperty [Re: Robert Martin]
      #598040 - 10/23/09 06:33 AM

I'll give it a try and see how it goes. Thanks for the tips .

Post Extras: Print Post   Remind Me!   Notify Moderator  
EAGLES
stranger


Reged: 08/15/06
Posts: 603
Loc: Other side of the Computer
Re: WaitProperty [Re: Robert Martin]
      #598045 - 10/23/09 06:52 AM

Do you have to specify up the to parent level to use WaidAliasChild? can I use like this?

The actual object:

Sys.Process("firefox").Page("http://www.sqaforums.com/newreply.php?Cat=0&Board=UBB43&Number=598029&page=0&what=showflat&fpart=1&vc=1&q=1").Table(0).Cell(0, 0).Table(1).Cell(0, 0).Table(1).Cell(1, 1).Table(2).Cell(0, 0).Table(0).Cell(1, 0).Form("replier").Textarea("Body")

Can I use:

Sys.Process("firefox").Page("http://www.sqaforums.com*").WaitAliasChild("replier",10000).exists

111
Quote:

I honestly don't like using the "Exists" property in any way outside of the Wait functions like WaitAliasChild, WaitChild, WaitVCLObject, etc. I would re-write your code above as

Code:

Set frmFinished = Aliases.TFSGetLatest.Finished
if frmFinished.WaitAliasChild("cl_Finished", 30000).Exists then Log.message("finished")



Forgive syntax errors as I'm not versed in VBScript.




--------------------
===========================================


Post Extras: Print Post   Remind Me!   Notify Moderator  
Allen_AQA
Active Member


Reged: 07/02/08
Posts: 1053
Re: WaitProperty [Re: EAGLES]
      #598207 - 10/25/09 11:40 PM

Hi Antoney,

No, you need to use the WaitForm method instead because you are using full names, not aliases, in this case.

BTW, the WaitAliasChild method examines child objects only one level deep (because the Aliases hierarchy is controlled by users anyway).

--------------------
Regards,
Allen - SmartBear Support


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 17 anonymous users are browsing this forum.

Moderator:  NickAQA, Robert Martin, martinh, brentpaine 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5009

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5