Jump to content
Sign in to follow this  
Annonyreeder

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

Recommended Posts

Annonyreeder

[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

Share this post


Link to post
Share on other sites
Melba23

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

 

Share this post


Link to post
Share on other sites
Annonyreeder

Sorry, i didnt add them in it did it on its own it was pissing me off i edited it out like 3 times and it would add more :S ........

thanks for removing though

Edited by Annonyreeder

Share this post


Link to post
Share on other sites
Melba23

Annonyreeder,

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

M23

  • Like 1

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

 

Share this post


Link to post
Share on other sites
Annonyreeder

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?

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

I used framegetcollection and it comes back with 0, ive also tryed _IEframegetobjname() and it comes back with 0 :(, any other ideas?

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
winterdews

Hi Wayfarer, 

I am also trying to perform auto login on to the TFS tool. Can you share the changes that you have done to make it working?

Thanks & Regards

Winterdews

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  

×