Ask a Question

BuiltIn.InputBox Method

SOLVED
sivakarthik
Contributor

BuiltIn.InputBox Method

Hello Comunity  memmbers,

 

I have a question regarding the BuiltIn.Input Method, is there a way to set to the input method the default value after certain time duration in the script

for e.g.

BuiltIn.InputBox("'0': Abort and '1': Option Menu", "Enter a value:", "1")

5 REPLIES 5
tristaanogre
Esteemed Contributor

No.  The Built-In input box basically halts the run until user input is performed. 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Hallo Robert Martin,

 

thanks, is there another way to do that in testcomplete 

 

please let me know if u have any ideas

 

thanks and regards

SivaKartheek

Hi,

 

I am not aware about any UI input method in any scripting language that auto-closes after timeout.

Consider, that any UI invoked by test code will stop test execution until UI is dismissed of. Which meand that test code that dispalys UI cannot be executed unattended.

While I think that I can suggest one possible solution, I would recommend to re-consider your test architecture and do not use UI elements in test code.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
tristaanogre
Esteemed Contributor

The POSSIBILITY exists... maybe... in some way... to use a UserForm in TestComplete that would, with the "OnShow" event, start a timer object that would check every few seconds to see if the time elapsed is long enough and then, when it hits that point, re-hide the form and send the appropriate value back to the calling script.

 

But, honestly.... that's a rather complex process.  KISS, you know. So, a better way to approach this is to try and understand what problem you're trying to solve and look for a different method rather than requiring user input.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Hallo Robert,

 

Thanks, even I thought of UserForms with OnShow Event action but, it was easy to implement with Builtin input Method in between the test run so thats why I asked is there any other Builtin appraoches which are available to take the input after certain duration as a default value.

 

Thanks and Regards

SivaKartheek Sreeram

cancel
Showing results for 
Search instead for 
Did you mean: