Jump to content

Can't seem to interact with TRIOLE service Desk, _IE command


Recommended Posts

[Hello, Im trying to make a login script for a work tool named "Triole service desk" or "TFS" for short, however i cant seem to use the _IE commands it doesn’t recognise the forms,

This is the source does this look different than normal IE windows?

Posted Image

This picture would suggest that the form is names "login" and the user login box is "USERNAME", however it doesn’t seem to be able to locate the form i get an error saying Form no match/unrecognised,

Also the windows INFO is as follows if this helps,

Title: TRIOLE Service Desk - Login (TFSSS01SS04) - Windows Internet Explorer

Class: IEFrame

[CLASS:Internet Explorer_Server; INSTANCE:1]

#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "[url="http://172.30.238.40/CAisd/pdmweb.exe"]http://172.30.238.40/CAisd/pdmweb.exe[/url]")
_IELoadWait($oIE, 0)
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "USERNAME")
$o_password = _IEFormElementGetObjByName($o_form, "PIN")
_IEFormElementSetValue($o_login, "Ant")
_IEFormElementSetValue($o_password, "Ant")
_IELoadWait($oIE, 0)

After using this code i get this error;

--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName,

Any help appreciated, thanks :)

Edited by Melba23
Removed font tags
Link to comment
Share on other sites

  • Moderators

Annonyreeder,

Please just use the standard font and colours - doing anything else risks rendering the post unreadable, as was the case with the above until I took all the BB font and colour tags away. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Annonyreeder,

If that happens, change to the basic editor using the button at top-left. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Also when i use this code

#include <IE.au3>
$oIE = _IECreate ("[url="http://172.30.238.40/CAisd/pdmweb.exe"]http://172.30.238.40/CAisd/pdmweb.exe[/url]")
$oForms = _IEFormGetCollection ($oIE)
MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
For $oForm In $oForms
    MsgBox(0, "Form Info", $oForm.name)
Next

Normally this will bring up a pop up showing the forms on the page, however when using on Triole/TFS it just gives me an error,

C:UsersreederaDesktopProjectsautoit-v3installIncludeIE.au3 (560) : ==> The requested action with this object has failed.:

WEnd

WEnd^ ERROR

>Exit code: 1 Time: 0.721

Has nobody seen anything like this befo?

Link to comment
Share on other sites

First, if you are getting a NOMATCH error when you see the element in the source, you are almost certainly dealing with Frames. You need to use the _IEFrame* functions to drill into them.

With the WEND error, it is a timing issue associated with COM error handling and is fixed with a combination of the latest AutoIt beta and the new IE.au3 that you'll find in the DOWNLOADS, LIBRARY section and pinned in the Latest Files section on the right side of the forum start page.

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

Thanks for reply dale, however what do yo mean by _IEframe?, I searched for examples on google but could only find the same codes im already using that are not workin

#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "[url="http://172.30.238.40/CAisd/pdmweb.exe"]http://172.30.238.40/CAisd/pdmweb.exe[/url]")
; get pointers to the login form and username and password fields
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "USERNAME")
$o_password = _IEFormElementGetObjByName($o_form, "PIN")
_IEFormElementSetValue($o_login, "User")
_IEFormElementSetValue($o_password, "Pas")
_IELoadWait($oIE)

Thanks.

Also, following your advise about the _IEframes, i came into this little code to help get all the frames on the page,

However when i use it i get an error saying "Page contains no frames".

$oFrames = _IEFrameGetCollection ($oIE)
$iNumFrames = @extended
If $iNumFrames > 0 Then
    If _IEIsFrameSet ($oIE) Then
        MsgBox(0, "Frame Info", "Page contains " & $iNumFrames & " frames in a FrameSet")
    Else
        MsgBox(0, "Frame Info", "Page contains " & $iNumFrames & " iFrames")
    EndIf
Else
    MsgBox(0, "Frame Info", "Page contains no frames")
EndIf
Edited by Annonyreeder
Link to comment
Share on other sites

Well, don't search google, search the AutoIt helpfile.

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

Try the functions with another page to insure that you are using them correctly (or study the examples in the helpfile to see what is different for you). Use a DOM inspector to insure there are no Frames in use (I like DebugBar - see my sig).

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

Thanks for your help, i checked my code and it 100% works, i tested it with another page that uses Iframe and its fine, after using this i took another looks at "Trioles" HTML code and i don't think it is using Iframes, im not 100% sure if its Java Iframe or what its really confusing me.

No "Getcollection" scripts seem to work they all come back 0, No "Getforms" work comes back 0.

Here is a better screenshot of the HTML i really want this to work

Help appreciated

thanks.

Posted Image

Link to comment
Share on other sites

  • Moderators

Dale is more than likely suggesting to you the html doesn't help as much as you think when it comes to frames.

Download the debug bar tool like he suggested.

Follow the tree down, you'll more than likely see the frame(s) he's suggesting are there.

Side Note:

You posted on the 23rd of April with the same type of content in another thread, obviously never solving the issue.

Ever think to provide an actual link that works?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Unfortunatly i cannot download any executable file on this machine as it is a work machine, it would require my linemanagers username and password which i doubt he would give me, Also the link is inaccessible to anyone not connected to the Fujitsu exchange, In other words No i cannot provide an actual link that works :/,

Edit:

Also i have used the same script on another page that uses Iframe, befor the form it actually says in the html <Iframe name =,

Where asin that source i posted theres no Iframe name, only Table ID Form names and somthing about java text

Edited by Annonyreeder
Link to comment
Share on other sites

I agree with SmOke_N.

Here's something else you can try for your sanity...

ConsoleWrite(_IEDocReadHTML($oIE))

does it return the source you expect?

How about

ConsoleWrite(_IEBodyReadHTML($oIE))

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

Hi dale, i downloaded the lasest au3 and autoit as your suggested,

After running both HTMLread codes i get

The requested action with this object has failed.:

Local $oTemp = $o_object.document

Local $oTemp = $o_object.document^ ERROR

Befor downloading the new AU3 it was giving me a wend error again, even when testing on google.com

[/sup]
#include <IE.au3>

$sURL = "[url="http://www.google.com"]Http://www.google.com[/url]"
$oIE = _IECreate($sURL)
ConsoleWrite(_IEDocReadHTML($oIE))
Edited by Annonyreeder
Link to comment
Share on other sites

Add _IEErrorHandlerRegister() to get more COM error info.

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, sorry its been a while since i replyed i only get a chance to work on this when im at work and ive had quite some time off though im back now,

 

Dale i tried to add  _IEErrorHandlerRegister() to the script however i got this error mesage

I have included IE.au3.

"0C:\Users\reedera\Desktop\Projects\_IE\Test2.au3 (12) : ==> Unknown function name.:
_IEErrorHandlerRegister()"

Also i retried your post from befor "ConsoleWrite(_IEDocReadHTML($oIE))"

This brings up the following

"--> IE.au3 T3.0-0 Error from function _IEAction, $_IEStatus_COMError (0)
<HTML><HEAD></HEAD>
<BODY></BODY></HTML>>Exit code: 0    Time: 0.732"

The _IEBody brings up nothing at all just

"--> IE.au3 T3.0-0 Error from function _IEAction, $_IEStatus_COMError (0)
0>Exit code: 0    Time: 0.615"

Edit:

Also i just wanted to add, this code defo 100% works as i tested it with another site that uses frames, although it did not write the frame name it does show the amount of frames on the page.

Edited by Annonyreeder
Link to comment
Share on other sites

Is your reference to _IEErrorHandlerRegister() after your includes? Figure this out first.

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

Working! :) TYVMM ALL :),

I have finally got it to work, tbh i don't even know how i did it i just took a snippet form the internet combined it with the code i already have and presto lol.

Thanks alot dale and everyone else who helped me with this :)

Regards

Ant

Edited by Annonyreeder
Link to comment
Share on other sites

  • 1 year later...

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