Jump to content

Problem with a .php page containing frameset


Recommended Posts

Here is my problem:

I am developing a script for a popular browser game. The main page of the game (to see it you need to access with user and psw) is done like this:

<frameset rows="*,0,0" frameborder="no" border="0" framespacing="0">

<frame name="mainframe" src="home.php" frameborder="0" scrolling="yes" noresize>

</frameset>

the line: $mainframe=_IEFrameGetObjByName ($oIE, "mainframe" ) gives, then, a positive outcome (@error = 0)

the browser, anyway, displays only home.html that looks like this:

<html><head><title>OGame.it Universo 3</title></head><frameset framespacing="0" border="0" cols="190,*" frameborder="0">

<frame name="Inhalt" target="Hauptframe" src="home_data/leftmenu.htm" noresize="noresize" marginwidth="0" marginheight="0">

<frame name="Hauptframe" src="home_data/overview.htm" target="_blank">

<noframes>

<body>

<p>Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht

unterstützt.</p>

</noframes>

</frameset>

</html>

Now the problem: How can I address the frames inside home.html?

I tried this:

$mainframe=_IEFrameGetObjByName ($oIE, "mainframe" )

$t=_IEIsFrameSet ($mainframe)

but a windows pops out saying:

Line 655 (File "C:\Program Files\AutoIt3\Include\ie.au3"):

If String($o_object.document.body.tagName) = "FRAMESET" then

If String($o_object.document^ ERROR

Error: The requested action with this object has failed

I don't understand..

Thank you in advance for your help..

Link to comment
Share on other sites

Yes.. but to get the access you need to enter. you can use this:

user: marcone

password: erakboer

and, from the drop down form, pick "31. Universo"

the website is: www.ogame.it

once inside, have a look at how the page is constructed! there is a frameset with 1 frame! and inside a page called home.php. Home.php is made of 2 frames that i cannot understand how to call..

thank you so much

Edited by marcone
Link to comment
Share on other sites

  • 1 month later...

Marcone,

Did you get any further on this one?

I'm having the exact same problem - not being able to access the inner (nested) frames...

When I run:

$oFrameMain = _IEFrameGetObjByName ($oIE, "mainframe")
     $oFrameH = _IEFrameGetObjByName ($oFrameMain, "Hauptframe")
     $oFrameL = _IEFrameGetObjByName ($oFrameMain, "Leftframe")

It comes back with this error (in SciTe):

C:\Program Files\AutoIt3\Include\IE.au3 (747) : ==> The requested action with this object has failed.:

$oTemp = $o_object.document.parentWindow

$oTemp = $o_object.document^ ERROR

Same codebase as Marcone.

Grtz,

Rick

Link to comment
Share on other sites

Try adding _IEErrorHandlerRegister() to the top of your code.

You could be hitting a cross-site frames security restriction. If that is the case, the only workaround is to display the frame you are trying to drill into in a new browser window and then work from there.

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

  • 2 years later...

post-57048-12704708220613_thumb.jpgpost-57048-12704708220613_thumb.jpg

Try adding _IEErrorHandlerRegister() to the top of your code.

You could be hitting a cross-site frames security restriction. If that is the case, the only workaround is to display the frame you are trying to drill into in a new browser window and then work from there.

Dale

I am facing the same problem.. How to display the frame in a new browser ??

Please find the attachment for the source structure. Thank you in advance.

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...