Sign in to follow this  
Followers 0
LOULOU

FRAMESET AND IE AUTOMATION

5 posts in this topic

Here is the adress of website

http://www.plan-affaires.net/essai/creation1.html

Here is the code of the frameset

<html>
<!-- Date de création: 30/05/2005 -->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  <title></title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="Patrick LOUVET">
  <meta name="generator" content="WebExpert 6">
</head>



    <frameset marginheight=0 marginwidth=0 rows="0,45,*" cols="*" frameborder="0" framespacing="0" id="frmset_top" >
    <frame name="cookie" src="creation/blanc.html" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto">   
    <frame name="bandeau" src="creation/framehaut.htm" frameborder="0" scrolling="no">
    <frameset marginheight=0 marginwidth=0 cols="160,*" id="frmset_bottom"  rows="*" frameborder="0" framespacing="0">
    <frameset marginheight=0 marginwidth=0 cols="*" id="frmset_left"  rows="130,*" frameborder="0" framespacing="0">
    <frame name="express" src="creation/framemenu.htm" frameborder="0" scrolling="no">
    <frame frameborder="0" name="menu" scrolling="no" src="creation/blanc1.html" marginheight="0" marginwidth="0">
    </frameset>  
    <frame name="contenu" src="creation/frameprincipal.htm" frameborder="0" scrolling="no">
    </frameset 
    <noframes>
    <head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  <title></title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="Patrick LOUVET">
  <meta name="generator" content="WebExpert 6">
</head>
<body>

</body>
</html>
</NOFRAMES> 
    </frameset>

Here is the code of Autoit3

#include "C:\Program Files\AutoIt3\beta\include\IE.au3"

$oIE0 = _IECreate()
_IENavigate($oIE0, "www.plan-affaires.net/essai/creation1.html")
$oIE2 = _IEFrameGetObjByName($oIE0, "menu")

_IEClickLinkByText(_IEFrameGetObjByName($oIE0, "menu"), "Menu 1")

Noone of these solution walks.

Share this post


Link to post
Share on other sites



Your 3rd FrameSet is not closed properly. You have </frameset instead of </frameset>

It appears that the display engine is more forgiving than the object model is in a case like this. The DOM believes that the document in the menu frame is empty. you can see this with

ConsoleWrite(_IEBodyReadHTML($oIE2) & @CR)

Please fix the Framset tag and let me know if you continue to have trouble and I'll look at it again.

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Shesh... after a bunch of testing and questioning whether I understood any of this stuff... I realized that it is just a simple problem.

The "Menu 1" link is not in the frame called "menu", it is in the frame called "express" -- I let the name suck me in.

So if you just change the frame name reference in the last line all should be well.

So, I'm not saying there are no bugs in IE.au3, but there isn't one here.

Dale

#include "C:\Program Files\AutoIt3\beta\include\IE.au3"

$oIE0 = _IECreate()
_IENavigate($oIE0, "www.plan-affaires.net/essai/creation1.html")
_IEClickLinkByText(_IEFrameGetObjByName($oIE0, "express"), "Menu 1"); express instead of menu

Edit: removed an unused line from the script

Edited by DaleHohm

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

Share this post


Link to post
Share on other sites

Shesh... after a bunch of testing and questioning whether I understood any of this stuff... I realized that it is just a simple problem.

The "Menu 1" link is not in the frame called "menu", it is in the frame called "express" -- I let the name suck me in.

So if you just change the frame name reference in the last line all should be well.

So, I'm not saying there are no bugs in IE.au3, but there isn't one here.

Dale

#include "C:\Program Files\AutoIt3\beta\include\IE.au3"

$oIE0 = _IECreate()
_IENavigate($oIE0, "www.plan-affaires.net/essai/creation1.html")
_IEClickLinkByText(_IEFrameGetObjByName($oIE0, "express"), "Menu 1"); express instead of menu

Edit: removed an unused line from the script

<{POST_SNAPBACK}>

On my intranet I test that

$Oie=-IEattach("DREL"

$banque = _IEFrameGetObjByName($oIE, "contenu")

$banque is an object I test it with IsoBJ

When i want to acess to $banque object I have an error

If IsObj($o_object.document) Then

$o_oject.document is not an object

Share this post


Link to post
Share on other sites

If you can reproduce your trouble on the public site, please let me know and I'll take another look.

If you cannot, I'd suggest that you try one of the debugging tools I use -- the DOM Inspector in the tools menu of Mozill Firefox (as another member of this board pointed out to me, there is a similar tool, although not free, for IE called "IE DOM Inspector" at http://www.ieinspector.com).

Here is a very basic step-by-step on how to use it:

1) start Firefox

2) Tools -> DOM Inspector

3) in the View menu of the DOM Inspector, insure that Browser is selected

4) type your URL into the URL box and click Inspect on the right

5) you should now have three panes showing. Make sure that the upper-left is set to "Document - DOM Nodes", upper-right to "Object - DOM Node", accross the bottom should be your webpage.

6) click on the icon to the left of the URL at the top of the page that shows the grey circle with the pointer in it (this sets the bottom page to show information about what you click on instead of operating like a webpage)

7) click on an object in your webpage in the bottom pane that you need information about

When you complete step 7), the left pane will show you where the object you clicked on falls in the document object hierarchy. The right pane shows you the needed detail about that object. You can click around in the object hierarchy in the left pane to explore further.

Good Luck,

Dale

On my intranet I test that

$Oie=-IEattach("DREL"

$banque = _IEFrameGetObjByName($oIE, "contenu")

$banque is an object I test it with IsoBJ

When i want to acess to $banque object I have an error

If IsObj($o_object.document) Then

$o_oject.document is not an object

<{POST_SNAPBACK}>


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

Share this post


Link to post
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
Sign in to follow this  
Followers 0