How can I do a Wait function in LeanFT like there is in UFT GUI?

  • Questions
  • How can I do a Wait function in LeanFT like there is in UFT GUI?
Question ID: 106959
1
0

UFT has Wait Seconds, [Milliseconds] but there is nothing in LeanFT.

Marked as spam
Posted by (Questions: 45, Answers: 0)
Asked on July 13, 2016 7:38 pm
34 views
Answers (3)
0
Private answer

For Visual Studio (c#) I created one static class with two static method called sleep which I can pass milli seconds and it will wait.

private static void sleep(double dTime)
{
dTime = dTime * 1000;
System.Threading.Thread.Sleep(Convert.ToInt32(dTime));
}

public static void sleep(int iTime)
{
sleep(Convert.ToDouble(iTime));
}

This can be put into a library class and used more often.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on July 13, 2016 7:41 pm
I did find that this works.... try { Thread.sleep(1000); } catch (InterruptedException e) { }
( at August 16, 2017 11:22 pm)
0
Private answer

Has anyone answered this question? I haven't been able to find a basic wait statement (that works) to use either, and it would come in handy.

Marked as spam
Posted by (Questions: 0, Answers: 3)
Answered on August 16, 2017 10:52 pm
0
Private answer

I did find that this works....

try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}

Marked as spam
Posted by (Questions: 0, Answers: 3)
Answered on August 16, 2017 11:22 pm