Jump to content
AutomationTestDev

Using IE.au3 from VS2015 C# test

Recommended Posts

AutomationTestDev

Hello - 

I'm relatively new to using AutoIt and could use some assistance on some questions I have.  I've been reading a lot of articles, and threads both here and other sites (google search results), and haven't found definitive answers.   I'm an automation Test Developer and I have a test that is exporting a file to Excel.  This action opens up an IEFrame at the bottom of the browser (IE11) window prompting me to open save or cancel the export.  AutoIT Window Info can identify the prompt, but not the buttons contains within the IEFrame.   

I saw another thread where I can include _IE.au3 which contains functions that would allow me to get the collection of elements within the IEFrame so that I can act on them.  I have AutoIxX3Lib added as a reference into the project in Visual studio, but do not seem to have access to any of the .au3 files in the 'include' folder that were installed with AutoIT on my local drive.  

I understand that I can write an AutoIT script and then compile it to its own .exe which I can call from my test.  But do I have to do it that way?  Can I write the script as a method in my automation framework?  

Other info:

Using Visual Studio 2015

C#

IE11, Windows 7 and 10.

Share this post


Link to post
Share on other sites
BrewManNH

AutoItX can not use any external functions, only the ones listed in its help file.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
AutomationTestDev
16 hours ago, BrewManNH said:

AutoItX can not use any external functions, only the ones listed in its help file.

BrewManNH, can you elaborate on that?  The functions I'd like to use from my automated test are listed in the help file.  They are the IEForm functions - 

IEFormElementGetCollection, IEFormElementGetObjByName.  

Share this post


Link to post
Share on other sites
JLogan3o13

@AutomationTestDev as BrewMan stated, look in the help file for AutoItX (in the directory where you installed AutoIt>>AutoItX>AutoItX.chm). Expand COM Interface and look at Methods Reference. These are the only methods that work.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
AutomationTestDev

JLogan3o13 thank you for the clarification, now I understand.  

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

×