Jump to content

Webpage Contains Multiple Source Codes


Recommended Posts

Hello!

I've come across an issue with trying to create a script that will automate inputing values into a webpage that is managed by a javascript database (I believe?). Normally, I would use the _IE UDF functions to create the webpage, but the webpage contains three different source codes that communicate together. If I use _IEcreate or _IEnavigate, how do I make sure those two functions would modify the correct source? I dont quite know the jargon to communicate this, hopefully this is making sense. I realize this is quite vague - i'm mostly looking for a point in the right direction.

Let me know if you need more information

Any help is appreciated!

Michael

Link to comment
Share on other sites

Possibly, but I dont think so. Here is an example of what i'm experiencing.

I open the webpage. I right click and view the source code on a certain particular spot on the webpage. This displays a source code that will have 200-300 lines of code. I then right click and view the source code on a different location on this webpage (same webpage just different coordinates). The source code will be different and will have 2000-3000 lines of code. This poses a problem because I don't know how to select a specific source code to manipulate with autoIT.

I noticed the source codes have different URLs, but since they are coming from the same webpage, im not quite sure what to do. The left side of the page is a searching function that will find SKU's. Once I search for a particular SKU, this will update the right side of the page (different source code) and generate the SKU attributes - which i want to modify with autoIT.

The only idea I came up with is using _IEattach and utilizing the URL option to locate the correct source. The URL changes, but the webpage does not. This worked, but it only worked for one particular source... this did not work for the SKU attribute source code :ermm: . I figured I would have to use the specific URL that is listed in the seperate source codes. But there isnt a unqueID in the URL so it wont pull up the SKU attributes, just a default webpage that's blank.

There's gotta be something I can do, I just cant seem to figure it out.

Let me know if you have any ideas.

Thanks!

Michael

Link to comment
Share on other sites

Instead of right-clicking, use a DOM inspector (like DebugBar in my sig) and things will be much clearer for you.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

  • 3 weeks later...

I tried DebugBar and it doesn't yield any more information. I don't see anything that indicates from DebugBar that indicates that there is more than one frame. I have also examined it using tools in Mozilla. And also when I executed the Autoit example to print all frames on the page it indicates that there is only one frame. In fact anything that I use autoit for (for example - all tables) will list using the "first page". I don't understand how there can be one page yet two page sources.

Link to comment
Share on other sites

I don't understand how there can be one page yet two page sources.

There cannot be. Continue your troubleshooting.

... it indicates that there is only one frame.

If there is one frame, then there is a top level document and it contains a frame (that contains another document that could in fact contain other frames).

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

  • 3 weeks later...

Hello, I am running into the same problem as jjohnson. My page has 3 different locations where I can click to bring up 3 completely different source codes. I used the AutoIt Window Info tool to find out that all 3 live in the same Frame/iFrame. When I right click and view souce, each source code window has a different URL in the title. For me, these differences are /topPage.imss, /left_reportsPage.imss, and /doReportInit.imss (which is much larger than either of the other 2). The interesting thing is that when I click on a link from the left_reportsPage source, it navigates to an inactive new url which in effect just updates the left column of the Frame. If I try to navigate to the url embedded under that link using the address bar I get the same left hand window, but neither of the other two parts of the Frame are there. I know this is probably hard to follow without being able to see an example, but I am in the same boat as jjohnson where this is a fairly specialized system where you wont see the problem unless you login. Any help would be great and I would be happy to answer any questions if I wasn't clear.

Thanks,

John

Link to comment
Share on other sites

You may be in the same boat, but the only problem you both share is that neither of you has a paddle.

Use a DOM inspector as I recommended above (that's your paddle).

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...