Hi,
I'm using autoIt3 for automatic testing of GUI. At the moment I'm having a strange problem where I try to fill in a bunch of fields using autoIt3.
This is the relevant part of the script I'm using:
$iTeller2 = 1
While $iTeller2 < 51
WinWaitActive("Media","InputForm")
ConsoleWrite($iTeller2 & ". OK, add (another) media object" & @CR)
ControlClick("Media", "InputForm", "WindowsForms10.BUTTON.app.0.378734a3", "left", 1)
ConsoleWrite($iTeller2 & ". Opening media object screen..." & @CR)
Sleep($delay)
WinWaitActive("Media Object", "")
ConsoleWrite($iTeller2 & ". Media object screen opened" & @CR)
Sleep($delay)
ControlClick("Media Object", "", "WindowsForms10.BUTTON.app.0.378734a2", "left", 1) ;opens a windows Open File screen
WinWaitActive("Open", "")
Sleep($delay)
ControlSend("Open", "", "Edit1", $sMediaFile, "")
ControlClick("Open", "", "Button2", "left", 1)
WinWaitClose("Open", "")
Sleep($delay)
ControlSend("Media Object", "", "WindowsForms10.EDIT.app.0.378734a3",$sMediaTitle & $iTeller2)
ControlClick("Media Object", "", "WindowsForms10.BUTTON.app.0.378734a6","left",1) ;ADD
Sleep($delay)
ControlSend("Media Object", "", "WindowsForms10.EDIT.app.0.378734a2", $sMediaTitle & $iTeller2)
ControlClick("Media Object", "", "WindowsForms10.BUTTON.app.0.378734a4","left",1) ;ADD
Sleep($delay)
ControlSend("Media Object", "", "WindowsForms10.EDIT.app.0.378734a4", "description")
Sleep($delay)
ControlClick("Media Object", "", "&Ok", "left", 1)
Sleep($delay)
WinWaitClose("Media Object", "")
$iTeller2 += 1
WEnd
The problem is as follows: the first time the script goes through the while loop everything works great. When a second iteration occurs, the first character from $sMediaTitle mysteriously disappears, and the script understandably can't find the file to add.
What am I doing wrong here?
Thanks in advance,
Perrin