AramisResearch Posted August 16, 2006 Posted August 16, 2006 I am trying to build an AutoIt script that can automatically log into a Citrix Metaframe Web Interface page and then click on an icon to run a published application. Here is the HTML source for the front page: expandcollapse popup<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>MetaFrame Presentation Server</title> <script language="javascript" type="text/javascript"> // // frameset.js // Copyright (c) 2003 - 2004 Citrix Systems, Inc. All Rights Reserved. // // Ensures that the "place" (e.g. a frame) specified really does // point to the required location. // This is called from an onload() in the frameset pages to fix // trouble with Safari not reloading frames when it reloads the // frameset. // function fixLocation(place, properLocation) { if (place.location.href.indexOf(properLocation) == -1) { place.location.href = properLocation; } } </script> </head> <frameset rows="*,0,0" border="0" framespacing="0" frameborder="no" onload="fixLocation(nfusemain, 'login.aspx');"> <frame src="login.aspx" name="nfusemain" title="The main display frame for Web Interface" marginwidth="0" marginheight="0" scrolling="yes" noresize frameborder="no" border="0" framespacing="0" > <frame src="html/timeoutrefresh.html" name="hiddenwindow" title="The hidden frame for the Web Interface session timeout functionality" marginwidth="0" marginheight="0" scrolling="yes" noresize frameborder="no" border="0" framespacing="0" > <frame src="html/timeoutrefresh.html" name="hiddenwindow2" title="The hidden frame for the Web Interface session reconnect functionality" marginwidth="0" marginheight="0" scrolling="yes" noresize frameborder="no" border="0" framespacing="0" > </frameset> <noframes> <body bgcolor=#FFFFFF> <h2>Non-Frame Browser Detected</h2> <p>You must have frames enabled to view these web pages.</p> </body> </noframes> </html> The problem is that I am not sure where to find the names of the form and the form elements here - I have not done much with HTML - and I see that it calls login.aspx, so maybe I can't get those items anyway. Has anyone out there tried this and had success? The point of the excercise is to devise a crude load testing scheme. We have a load testing application, but I know little about it and it uses .ICA files to directly access the application(s) on the Citrix farm. The trouble with this is that it bypasses the web front end and the SSL proxy, and those are the items I want to load test. Thanks, -Chris
Paulie Posted August 16, 2006 Posted August 16, 2006 I am trying to build an AutoIt script that can automatically log into a Citrix Metaframe Web Interface page and then click on an icon to run a published application. Here is the HTML source for the front page:The problem is that I am not sure where to find the names of the form and the form elements here - I have not done much with HTML - and I see that it calls login.aspx, so maybe I can't get those items anyway. Has anyone out there tried this and had success? The point of the excercise is to devise a crude load testing scheme. We have a load testing application, but I know little about it and it uses .ICA files to directly access the application(s) on the Citrix farm. The trouble with this is that it bypasses the web front end and the SSL proxy, and those are the items I want to load test.Thanks,-ChrisCould you possibly give us the info you get when you use autoit window info?
AramisResearch Posted August 16, 2006 Author Posted August 16, 2006 Well, there is no Control ID listed for either of the fields that appear for User ID or Login. That was one of the first things I looked for. The ClassNameNN field just says "Internet Explorer_Server1" and there is nothing listed under Text.
Paulie Posted August 16, 2006 Posted August 16, 2006 (edited) Well, there is no Control ID listed for either of the fields that appear for User ID or Login. That was one of the first things I looked for. The ClassNameNN field just says "Internet Explorer_Server1" and there is nothing listed under Text.Yeah, the 'Control*' Functions don't work to well in IELook for IE.au3These UDFs will probably do EXACTLY what you want with little effort,I'll see if i cant get you a linkEdit:Donehttp://www.autoitscript.com/forum/index.ph...c=25629&hl= Edited August 16, 2006 by Paulie
AramisResearch Posted August 16, 2006 Author Posted August 16, 2006 I did look in IE.AU3, and I thought I could start with the form completion parts like IEFormGetObjByName and such, but I have not had any success in figuring out what to use for $s_name. I used the little code snippet on the AutoIT help widget as model and I can do Google searches now, but little else.
DaleHohm Posted August 16, 2006 Posted August 16, 2006 Your start page is all frames. You need to find the frame that has the form in it, use $oFrame = _IEFrameGetObjByName($oIE, "frame-name") and then use $oFrame where $oIE is used in the form examples. 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
wrecklesswun Posted July 25, 2008 Posted July 25, 2008 Your start page is all frames. You need to find the frame that has the form in it, use $oFrame = _IEFrameGetObjByName($oIE, "frame-name") and then use $oFrame where $oIE is used in the form examples.Daleyou can use user and password...use ie dev toolbar to see this
Metaspace Posted October 2, 2011 Posted October 2, 2011 (edited) Hello! This thread is quite old now and I hope there is a solution to the issues discussed here. I would be very grateful if someone would share it. Here are my problems:I need to automate a web-based Citrix logon and auto-start a particular application.Some activity needs to be simulated on the Citrix Web interface in order to prevent it timing out.I would be most grateful if you have a solution to any of these and would be willing to share it. Thank you! EDIT (3Oct2011): Point 1 has been sorted out. Not in the most elegant way as there are some security zone issues when using the _IECreate, but ultimately I managed to automate the Citrix logon and to run a particular application of my choice. The second issue still stands. I do not know how to list the currently opened windows, make sure particular one is in focus, simulate a mouse movement or some such action that will keep it from timong out... To avoid further duplication, I will keep this thread updated: Edited October 3, 2011 by Metaspace
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now