Hi,
I am trying to automate this webpage.
http://www.ec.gc.ca/CEPARegistry/subs_l ... search.cfm
I can input my query item (CAS number) into the right box, but there are two search buttons. I am supposed to click the second one for CAS number. However, using the code generate by WebRecorder, it seems like I click the first search button.
How can I tell scripts to click the second one?
Thanks a lot! Here is part of my code:
IE_Navigate>%IE[0]%,http://www.ec.gc.ca/CEPARegistry/subs_l ... arch.cfm,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>FieldName={"critCAS"}
Let>FieldValue={"71-43-2"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={""}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r
how to click second search button
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Instead of using NAME to identify the input button you could use INDEX to identify it numerically. See the WebRecorder help file topic for ClickTag.
An alternative would be to use FindImagePos to find all occurrences of the button.
An alternative would be to use FindImagePos to find all occurrences of the button.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
using index
Hi,
I am trying to use index for clicktag. I tried several format of clicktag, but it is not working for me. There is no usage example for this case. Could you please let me know how to use it exactly?
Here is my code and it doesn't click anything yet. Thanks a lot!
IE_Navigate>%IE[0]%,http://www.ec.gc.ca/CEPARegistry/subs_l ... arch.cfm,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>FieldName={"critCAS"}
Let>FieldValue=line
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={""}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,INDEX,1,str:TagValue,r
I am trying to use index for clicktag. I tried several format of clicktag, but it is not working for me. There is no usage example for this case. Could you please let me know how to use it exactly?
Here is my code and it doesn't click anything yet. Thanks a lot!
IE_Navigate>%IE[0]%,http://www.ec.gc.ca/CEPARegistry/subs_l ... arch.cfm,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>FieldName={"critCAS"}
Let>FieldValue=line
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={""}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,INDEX,1,str:TagValue,r