I am trying to automate accepting work from a website. Orders are advertised and you have to accept them within seconds, or they are gone and you are SOL. And I do mean seconds.
So, I opened the page in WebRecorder and refreshed until an order came up. The recorded commands look great up to this point, but something appears to go wrong when I actually accept the order. It goes like this:
a) order appears
b) you click the accept button that records as this in WebRecorder:
Code: Select all
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"https://xxx.xxxxxx.com/image/AdvertImages/Accept.gif"}
IE_ClickTag>%IE[1]%,str:FrameName,str:FormName,IMG,HREF,str:TagValue,r
The problem is that the frame does not appear to register with WebRecorder. After I hit the first accept, this is all I get:
Code: Select all
IE_Wait>%IE[1]%,r
Wait>delay
IE_Wait>%IE[1]%,r
Wait>delay
IE_Wait>%IE[1]%,r
Wait>delay
IE_Refresh>%IE[1]%,r
IE_Wait>%IE[1]%,r
IE_Refresh>%IE[1]%,r
IE_Wait>%IE[1]%,r
Label>end_script
Code: Select all
// Generated by MacroScript WebRecorder 2.1
// Recorded on Tuesday, February 16, 2010, at 02:49 PM
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
IE_Create>0,IE[0]
IE_Navigate>%IE[0]%,https://www.xxxxxx.com/app/work/summary.aspx?port_id=,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"XXXX"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"Advertised Orders"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
IE_WaitNew>0,IE[1]
IE_Wait>IE[1],r
IE_Wait>%IE[1]%,r
Wait>delay
IE_Wait>%IE[1]%,r
Wait>delay
IE_Refresh>%IE[1]%,r
IE_Wait>%IE[1]%,r
// right here is where the new order appears
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"https://xxx.xxxxxxx.com/image/AdvertImages/Accept.gif"}
IE_ClickTag>%IE[1]%,str:FrameName,str:FormName,IMG,HREF,str:TagValue,r
// right here is where the new frame pops up to accpet the contract but does not appear to register with WebRecorder
IE_Wait>%IE[1]%,r
Wait>delay
IE_Wait>%IE[1]%,r
Wait>delay
IE_Wait>%IE[1]%,r
Wait>delay
IE_Refresh>%IE[1]%,r
IE_Wait>%IE[1]%,r
IE_Refresh>%IE[1]%,r
IE_Wait>%IE[1]%,r
Label>end_script
All my very best,
John