Jump to content

[Solved] _IE unable to find or read obj


Recommended Posts

No, I'm wanting the main pages source, the one that holds all the iframes, if you look at Post# 18 where you ran the code to get div information thats the page.  You'll notice that none of the source pages you posted have the following text

TMUIInlineFrameComponent
Link to comment
Share on other sites

I'm not familiar with HTML or the like, so forgive me if it takes a moment to find the right information.

This seems to be what you're looking for ( TMUInlineFrameComponent )

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html class="p_TMMaximized"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta content="IE=EDGE" http-equiv="X-UA-Compatible"><meta content="IE=EDGE" http-equiv="X-UA-Compatible"><script src="/js/comm/rcf/common.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/dragDrop.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/event.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/peer.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/component.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rt.js" type="text/javascript" language="javascript"> </script><script src="/js/buttons/buttons.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/ajax.js" type="text/javascript" language="javascript"> </script><script src="/js/help.js" type="text/javascript" language="javascript"> </script><script>

        TMAssert.DEBUG = false;
        TMAgent.AGENT = TMAgent.getAgent(this);
        TMPage.PAGE = new TMPage(this);
        TMPage.PAGE.setRenderedByJSP(false);

        appendOnLoadScript();

       // TMPage.PAGE.__onLoad();

        var glogUrlPrefix = '';
        var glogServlet = '1493280755875';
        var glogUrlContext = '\x2FGC3\x2F';
        var glogRawUrlContext = 'GC3';
        var breadCrumbsKey = '';
        var vol_width  = 'Width';
        var vol_height = 'Height';
        var vol_length = 'Length';
        var vol_calc = 'Calculate';
        var vol_width_alert  = 'Width\x20must\x20be\x20a\x20number';
        var vol_height_alert = 'Height\x20must\x20be\x20a\x20number';
        var vol_length_alert = 'Length\x20must\x20be\x20a\x20number';
        var show_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fshow.gif";
        var hide_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fhide.gif";
        var show_img_alt = "Expand";
        var hide_img_alt = "Collapse";
        var spacer_solid_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fspacer_solid.gif";
        var selected_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fselected.gif";
        var grid_edit_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fupdateicon_enabled.gif";
        var grid_delete_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fdeleteicon_enabled.gif";
        var move_left_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fshuttle_remove_enabled.gif";
        var move_right_img = "\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fshuttle_move_enabled.gif";
    var browser = navigator.appName;
    var ie = "Microsoft Internet Explorer";
    var netscape = "Netscape";
        var displayPopupsFormatted = true;
        var ct = '251521145';
        var isTablet = false;
        var addClientSessionEvents = false;        
        var loadingImage = '\x2Fimages\x2Fthemes\x2Fthemesswanblue\x2Fprocess_animation.gif';

        </script><link type="text/css" rel="styleSheet" href="/css/themes/themesswanblue.css"><script src="/GC3/glog.webserver.util.JSTranslatorServlet/1493280755875?ct=251521145" type="text/javascript" language="javascript"> </script><script src="/js/validation/validation.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/fields.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/otm/steps.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/button.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/panel.js" type="text/javascript" language="javascript"> </script><script src="/js/comm/rcf/navigation.js" type="text/javascript" language="javascript"> </script><script>TMPage.PAGE.setWindowTitle('');</script><script>
                TMPage.PAGE.bufferComponent(new TMUIDocumentComponent('gc3Layout:pageDocument',{}));
                var restoreStr = 'Restore';
                var collapseStr = 'Collapse';
                var psHorizontalCollapseImg = '/images/themes/themesswanblue/splitterhc.png';
                var psHorizontalRestoreImg = '/images/themes/themesswanblue/splitterhr.png';
                var psVerticalCollapseImg = '/images/themes/themesswanblue/splittervc.png';
                var psVerticalRestoreImg = '/images/themes/themesswanblue/splittervr.png';

            </script></head><body class="tm_document p_TMMaximized "><form action="return false;" method="post" id="gc3Layout:management_main" name="management_main" class="tm_form"><script>
        TMPage.PAGE.bufferComponent( new TMUIPanelSplitterComponent('gc3Layout:ps2', {'orientation':'vertical','splitterPosition':46, 'positionedFromEnd':false,'collapsed':false }));
    </script><div id="gc3Layout:ps2" style="position: absolute; width: auto; height: auto; top: 0px; left: 0px; bottom: 0px; right: 0px;" class="tm_panelSplitter"><div style="border-width: 0px; padding: 0px; height:46px;top:0px;bottom:0px;left:0px;right:0px;
                " class="tm_panelSplitter_pane" id="gc3Layout:ps2::f"><div style="position:absolute;left:0px;top:0px;right:0px;bottom:0px;height:100%"><iframe width="100%" height="100%" src="/GC3/glog.webserver.problem.CheckProblemServlet/nss?ct=251521145" scrolling="no" frameborder="0" id="topbar" name="topbar">&nbsp;</iframe></div><script>
        TMPage.PAGE.bufferComponent(new TMUIInlineFrameComponent('topbar', {'source':'/GC3/glog.webserver.problem.CheckProblemServlet/nss?ct=251521145'}));
    </script></div><div style="border-width: 0px; padding: 0px; height: 7px; top:46px;bottom:0px;left:0px;right:0px;
                " class="tm_panelSplitter_vertical-divider" id="gc3Layout:ps2::d"><div style="display: none;" class="tm_panelSplitter_vertical-highlighter" id="gc3Layout:ps2::h">&nbsp;</div><a id="gc3Layout:ps2::i" class="tm_panelSplitter_vertical-icon-style" onclick="return false" href="#"><img border="0px" src="/images/themes/themesswanblue/splittervc.png" title="Collapse" alt="Collapse"></a></div><div style="border-width: 0px; padding: 0px; top:52px;bottom:0px;left:0px;right:0px;
                 border: 0px;" class="tm_panelSplitter_pane" id="gc3Layout:ps2::s"><script>
        TMPage.PAGE.bufferComponent( new TMUIPanelSplitterComponent('gc3Layout:ps3', {'orientation':'horizontal','splitterPosition':185, 'positionedFromEnd':false,'collapsed':false }));
    </script><div id="gc3Layout:ps3" style="position: absolute; width: auto; height: auto; top: 0px; left: 0px; bottom: 0px; right: 0px;" class="tm_panelSplitter"><div style="border-width: 0px; padding: 0px; width:185px;top:0px;bottom:0px;left:0px;right:0px;
                " class="tm_panelSplitter_pane" id="gc3Layout:ps3::f"><div style="position:absolute;left:0px;top:0px;right:0px;bottom:0px;height:100%"><iframe width="100%" height="100%" src="/GC3/glog.webserver.usermenu.ViewUserMenuServlet/nss?ct=251521145&amp;full=y" scrolling="auto" frameborder="0" id="sidebar" name="sidebar">&nbsp;</iframe></div><script>
        TMPage.PAGE.bufferComponent(new TMUIInlineFrameComponent('sidebar', {'source':'/GC3/glog.webserver.usermenu.ViewUserMenuServlet/nss?ct=251521145&full=y'}));
    </script></div><div style="border-width: 0px; padding: 0px; width: 7px; left:185px;top:0px;bottom:0px;right:0px;
                " class="tm_panelSplitter_horizontal-divider" id="gc3Layout:ps3::d"><div style="display: none;" class="tm_panelSplitter_horizontal-highlighter" id="gc3Layout:ps3::h">&nbsp;</div><a id="gc3Layout:ps3::i" class="tm_panelSplitter_horizontal-icon-style" onclick="return false" href="#"><img border="0px" src="/images/themes/themesswanblue/splitterhc.png" title="Collapse" alt="Collapse"></a></div><div style="border-width: 0px; padding: 0px; left:191px;bottom:0px;top:0px;right:0px;
                 border: 0px;" class="tm_panelSplitter_pane" id="gc3Layout:ps3::s"><div style="position:absolute;left:0px;top:0px;right:0px;bottom:0px;height:100%"><iframe width="100%" height="100%" src="/GC3/glog.webserver.util.BodyServlet/nss?ct=251521145" scrolling="auto" frameborder="0" id="mainBody" name="mainBody">&nbsp;</iframe></div><script>
        TMPage.PAGE.bufferComponent(new TMUIInlineFrameComponent('body', {'source':'/GC3/glog.webserver.util.BodyServlet/nss?ct=251521145'}));
    </script></div></div></div></div></form><script>
        TMPage.PAGE.bufferComponent(new TMUIFormComponent('gc3Layout:management_main',{}));
    </script></body></html>

 

Edited by FengHuangWuShen
Link to comment
Share on other sites

I tried linking everything together I guess, but it still failed.
Going from the first form object ( management_main ), then underneath that tree came ( mainBody ) Frame, then inside that frame is the form ( shipmentSearchForm ).

 

Local $IE = _IEAttach("Shipment Search")
Local $IE_Main = _IEFormGetObjByName($IE, 'management_main')
Local $IE_Frame = _IEFrameGetObjByName($IE_Main, 'mainBody')
Local $IE_Shipment = _IEFormGetObjByName($IE_Frame, 'shipmentSearchForm')
Local $Container_Obj = _IEGetObjByName($IE_Shipment, 'containerId', 45)
Local $Container_Input = _IEFormElementSetValue($Container_Obj, 'Test')

 

Link to comment
Share on other sites

Thanks thats the information I was after, it appears you have three iFrames named:

  • topbar
  • sidebar
  • body

The main source page has no Title so using _IEAttach("Title") will have no effect, the title is pulled from one of the iFrames, so you would need to use the full url.  Unfortunately the iFrames are created using an Oracle function so can't test locally, want to see if I can get the frame name.  So can you test this by using:

Local $oIE = _IEAttach("https://<add url here>", 'url')
Local $oFrames = _IEFrameGetCollection($oIE)
For $oFrame In $oFrames
    ConsoleWrite($oFrame.name & @CRLF & $oFrame.id & @CRLF)
Next

 

Link to comment
Share on other sites

Can you try:

#include <IE.au3>

;~ You can use a partial URL i.e. assuming the first part of the URL won't change, just the session id which is at the end
Local $oIE = _IECreate("https://<url without session id>", 1)
Local $oFrame = _IEGetObjById($oIE, "mainBody")
Local $oMainBody = $oFrame.contentWindow
MsgBox(0,'', $oMainBody.document.GetElementbyId("message").innertext)

 

Link to comment
Share on other sites

Did you mean to use IEAttach? IECreate with a partial url doesn't seem correct :P

But either way, it's not returning anything.
I get this:

 

Local $oFrame = _IEGetObjById($IE, "mainBody")
Local $oMainBody = $oFrame.contentWindow
ConsoleWrite('Message - ' & $oMainBody.document.GetElementbyId("message").innertext)

Response:
 

Message -

 

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