08-22-2007 10:41 PM
08-22-2007 11:20 PM
Hi Sniepsy,
After seeing your first post I actually spent some time on this - but navigating the MSHTML objects is a mess!
Possibly there's an alterntive for "Submit" - for instance, is it possible to invoke the "click" method of the "track" image object instead? I tried this but could never be sure I'd selected/cast the right object (and "click" never did anything). FYI: It appears security-settings can interfere with this page - in IE, if "internet" security is set higher than "Medium", make sure this is a "trusted site".
I know it's not much help - sorry!
Cheers.
08-22-2007 11:28 PM
Hi tbd,
Thanks for taking a look at it, I was working down the same track with the click idea but ran into the same trouble. The concept is easy, and should be a straight forward program but this has so far beaten me. I think the code I need is exactly as you say, isolate the button "track" and invoke a click on it. Any of you NI guys and gals got any ideas on this?
Cheers
08-23-2007 12:12 PM
08-23-2007 02:15 PM
Hi Nadim,
Having spent several more hours on this, your interest in helping is appreciated. Can you help determine what kind of object the track <input> is? (type="image"). Also, how to get a reference to it? It doesn't seem to be accessible on the "id" form (which has only 4 objects) and while the document returns 63 "IMG" objects in the images collection, none of them seems to be for "track". When I pause the page after Sniepsy writes the tracking number, and during the pause, manually click "track" - the page navigates to the desired page, so, maybe the "click" method is enough - if we can just invoke it on the correct object. BTW, when/if we can invoke track/"click", then checkandsubmit() will be performed by the browser.
Cheers!
08-24-2007 04:23 AM
tbd,
you are definately on to something but I am having trouble as maybe you are, isolating elements and then applying a method to them. Yi Y do you know how to invoke a click on this track button?
I cant seem to isolate this button and add a click method. Is the track button an element of the "id" form? It doesn't appear to be.
How can you isolate all buttons as elements, and which form are they in (if any) and then provide an invoke method to them.
cheers
08-24-2007 11:39 PM
Hi Sniepsy,
Just an FYI, I'll be working on this for the next few hours - please let me know if you've made any progress! Am currently looking at "links" and "all" document properties. "All" has a length of 767 objects - one of them must be the track image!
Cheers.
08-25-2007 12:09 AM
Hi tdb,
The image for track is called nav_icon_t.gif as you are probably aware. So now we just need to isolate this image and click it!
It is a bit past my knowledge of web programming, so I'm hoping one of you may know how to do it. I dont really understand the process of isolating images, so if you can shed some light would be great. I've attached a new copy of my code which works with fedex tracking. It has a submit element to the form so it works.
Dont waste too much of your time on it tdb, unless of coarse you may need this function for yourself. I cant afford to waste to much time on it, and I figure someone will eventually show us, in 5 seconds how to do it. where is that person?
Cheers
08-25-2007 12:11 AM - edited 08-25-2007 12:11 AM
Hi Sniepsy,
Found "track" item in Documents:All... CLICK!
I don't mind spending time on interesting stuff - and programmatic-web-page navigation is interesting to me (, though you know the old saying: "little things amuse little minds" ).
Cheers!
Message Edited by tbd on 08-25-2007 12:16 AM
Message Edited by tbd on 08-25-2007 12:17 AM
08-25-2007 12:59 AM