Jump to content
Sign in to follow this  
wolendranh

Getting control on elements inside Internet Explorer_Server

Recommended Posts

wolendranh

Hi!

I need to get an control in 3rd party application witch use Internet Explorer_Server class. 

It is online installer that use IE for displaying.

I saw an few snippets with _IEAttach but I am not sure how to make them suitable to my installer.

Could you help with it?

Share this post


Link to post
Share on other sites
gruntydatsun

You're more likely to get help if you provide the program name and access to the installer or your code that is causing problems.

Share this post


Link to post
Share on other sites
wolendranh

Hi!

http://www.winzip.com/downauto.cgi?ads=y&avg=y&lang=en&o=1&file=http://download.winzip.com/winzip180.exe&email=&er=&os=win&sid= - here is link for download, it is WinZip 180.

When you rin it there is a dialog box with ok, button and i have no idea how to take control of button located there. 

I try _IEAttach but without resilt.Also i find some useful information using AU3info but there was just class:Internet Explorer_Server...

Thanks for respons

P.s. sorry for my English )

Share this post


Link to post
Share on other sites
junkew

 This UI Automation works on installer of WinZIP

'?do=embed' frameborder='0' data-embedContent>>

Sample to get thru first step of installer (find window and click next button)

You could have been doing this

_UIA_Action("name:=next","left")

compared to my preference of giving first a logical name and in the actual script use the logical name

_UIA_setVar("WinZIP.Next","name:=Next >")
_UIA_action("WinZIP.Next","left")
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=Beta
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <constants.au3>
#include <WinAPI.au3>
#include <debug.au3>
#include "CUIAutomation2.au3"
#include "UIAWrappers.au3"
HotKeySet("{ESC}", "Terminate")

;~ Turn debugging UIA on by default, dumps most details to consolewindow for the moment, later will use a logfile
;~ _UIA_setVar("Global.Debug",true)
;~ _UIA_setVar("Global.Highlight",true) ;- Highlights object when found

;~ Set the system under test variables
_UIA_setVar("SUT1.Folder","C:\Downloads")
_UIA_setVar("SUT1.Workingdir","C:\Downloads\")
_UIA_setVar("SUT1.EXE","WinZip180.exe")
_UIA_setVar("SUT1.Fullname", _UIA_getVar("SUT1.Folder") & "\"& _UIA_getVar("SUT1.EXE"))
_UIA_setVar("SUT1.Parameters","")
_UIA_setVar("SUT1.Processname","WinZip180.exe")
_UIA_setVar("SUT1.Windowstate",@SW_RESTORE)

_UIA_setVar("SUT1.Fullname", _UIA_getVar("SUT1.Folder") & "\"& _UIA_getVar("SUT1.EXE"))

;~ Set the system under test objects to recognize and abstract logical and physical names for readability in main script

;~ _UIA_setVar("WinZIP.mainwindow","name:=WinZip 18.0")
_UIA_setVar("WinZIP.mainwindow","classname:=AVGInstall.*FrameWindow")

_UIA_setVar("WinZIP.Exit","name:=Exit")
_UIA_setVar("WinZIP.Next","name:=Next >")

;~ Start system under test
_UIA_DEBUG("Starting system under test" & @CRLF)
_UIA_StartSUT("SUT1")
_UIA_DEBUG("SUT is started" & @CRLF)

_UIA_DEBUG("PID of SUT1 is " & _UIA_getVar("SUT1.PID") & @CRLF)

;~ Main script
_UIA_DEBUG("*** Main script started ***" & @CRLF)
_UIA_action("WinZIP.mainwindow","focus")

;~ _UIA_DumpThemAll(_UIA_getVar("RTI.WinZip.MAINWINDOW"),$treescope_subtree)

_UIA_action("WinZIP.next", "left")



; The End
Func Terminate()
    consolewrite("Exiting")
    $running=false
;~  Exit 0
EndFunc   ;==>Terminate

Share this post


Link to post
Share on other sites
wolendranh

Hello Junkew!

Thanks for great help! I tried script sample provided by you, but find out that there is an error:

 UIAWrappers.au3 (563) : ==> Variable must be of type "Object".

Share this post


Link to post
Share on other sites
junkew

you need to provide more info

1. run it from SCITE

2. what do you see as output on the consolewindow

Which language and version of Windows are you using

3.Start from the UIA thread in the first post the simple spy

4. Start the winzip installer

5. Once you see the screen hover with the mouse to the window and press the shortkey ctrl+w and post what you see as based on that you can see the controls getting highlighted and from the properties I can determine the description you have to use

Share this post


Link to post
Share on other sites
wolendranh

Hi!

It seems it was my fault!

o:)

It solve my problem ! thank you very much! I was looking for such method a lot of time. 

If you have a time, one more question:

Where could i find some *info for your includes?(UIA_action and etc.)

Share this post


Link to post
Share on other sites
junkew

Just follow that specific thread and wait for updates/documentation and ask your request(s) in the UIA thread and I will answer them

For the moment its just by reading that specific thread and the sourcecode of the UDF. UIA is a large framework and with the UDF I am trying to simplifying it (and leave the power to the powerusers that can read the UDF)

  • Like 1

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  

×