Insertion of WebEdit successful + parameterization works STILL improvisation needed
Below was a problem for which ultimately I found the solution I think. But I still think, it can be done in better way with your help.
Original Problem - There is screen called Resume builder on which there are two webedit fields: Username, Password. I parameterized the user name.
My below script would just NOT pass the Username value for most of the time. Roughly, if I try 10 times, it passes only 2 times.
'Browser("NEworks_2").Page("NEworks").WebEdit("htm l id:=txtUsername","value:=Username").Set DataTable.Value("UserName","Global")
After trying different ways and researching online, I finally used WaitProperty. I did try other WaitProperty, but it seemed only outerhtml worked better.
Browser("NEworks").Page("NEworks").WebEdit("ctl00$ txtUsername").WaitProperty "outerhtml","<input name=""ctl00\$txtUsername"" class=""txtUsername"" id=""txtUsername"" onfocus=""setDefaultButton\('ctl00_cmdLogin'\)"" type=""text"" maxLength=""256"" autocomplete=""off"">",12000
It worked great.
It looks like, for some reason, after page would invoke, many times Web Edit field (Username) was not activated. This cause script to fail while inserting Username. This is what I think, I might be wrong.
I need your opinion and some better way to handle if you think. Please do reason your opinion. This way we will learn.
You can add those properties you are waiting on to the object identifiers in the object repository for this object WebEdit("ctl00$ txtUsername").
That way every time you referenced it, it would wait for all those properties to be what they should be before proceeding automatically without an extra waitproperty step.