Sign in to follow this  
Followers 0
Naveen1234

How to automate clicking icon and unput username and password using AUTOIT in Robot Framework?

11 posts in this topic

I need to automate the following scenario :

STEP 1. Launch airtel application by clicking airtel icon available in Desktop
STEP 2. Then Input "Username" and "Password" in opened screen
STEP 3. Then click on "connect" button

I am able to do the first step using the following script:

*** Settings ***
Library         AutoItLibrary

*** Variables ***
${airtel}       C:\\Program Files\\airtel\\airtel.exe

*** Test Cases ***
Example
    Run             ${airtel}
    Mouse Click     strButton=LEFT, nX=369, nY=489, nClicks=2, nSpeed=-1

I am using "Au3Info" tool, to get mouse position.

Can anyone please tell me how to do the STEP 2 and STEP 3?

Thanks in advance.

 

Share this post


Link to post
Share on other sites



Welcome to Autoit and the forum!

Please have a look at ControlSend and ControlClick in the help file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks for your reply.

I have modified as shown below:

*** Settings ***
Library            AutoItLibrary

*** Variables ***
${airtel}        C:Program Filesairtelairtel.exe

*** Test Cases ***
Example
    Run                        ${airtel}
    Control Send            strTitle=airtel, strText=FolderView, strControl=1, strSendText=test,nMode=0
    Control Click            strTitle=airtel, strText=FolderView, strControl=1, strButton=LEFT, nNumClicks=1, nX=1228, nY=601

 

But I am getting error as shown below:

 

com_error: (-2147352561, 'Parameter not optional.', None, None)

 

Please suggest me how to fix this.

Edited by Naveen1234

Share this post


Link to post
Share on other sites

I'm not familiar with the framework you use and how it interacts with AutoIt.

I would try to remove the parameter names and the space in "Control Send". Example:

ControlSend "airtel", "FolderView", 1, "test", 0

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If You're using AutoItx in this framework, then I think there are no optional parameters in any call.

Since your Control* functions appear to have the correct amount, I'd have to assume that Run function is the culprit here.

Something like ...

Run                        strFilename=C:Program Filesairtelairtel.exe, strWorkingdir= C:Program Filesairtel, intFlag=1

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Still I am getting same error:

com_error: (-2147352561, 'Parameter not optional.', None, None)

 

Could you please tell me, How to do this without using Robot framework (I mean pure Autoit Script).

 

Thanks for your help.

Share this post


Link to post
Share on other sites

Certainly, just as soon as you post the window info summary tab info of both the username and password controls on the window and the button you want to click.

Provide all info from the summary tab for all three controls, and the native code is simple, without it, it's impossible.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Please find below the Summary Tab info for "Email", "Password" and "PLAY" button.

   

I want to do the following through Autoit Script:

STEP 1 - Enter Email ID :  test@gmail.com

STEP 2 - Enter Password : test@123

STEP 3 - Press "PLAY" button.

   

Email Field Summary:
====================

>>>> Window <<<<
Title:    QUAKE LIVE Launcher
Class:    WindowsForms10.Window.8.app.0.33c0d9d
Position:    308, 105
Size:    750, 517
Style:    0x16010000
ExStyle:    0x00050000
Handle:    0x00030362

>>>> Control <<<<
Class:    WindowsForms10.EDIT.app.0.33c0d9d
Instance:    1
ClassnameNN:    WindowsForms10.EDIT.app.0.33c0d9d1
Name:    f_email
Advanced (Class):    [NAME:f_email]
ID:    328436
Text:    
Position:    78, 462
Size:    150, 20
ControlClick Coords:    44, 11
Style:    0x560100C0
ExStyle:    0x00000200
Handle:    0x000502F4

>>>> Mouse <<<<
Position:    430, 578
Cursor ID:    0
Color:    0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
12/23
Support Holiday Break
12/18
Holiday Content Online
12/10
Update 22 Follow-up
12/08
Quake Live Non-recurring Subscription...
QUAKE LIVE is Online.
Latest News
Server Status
Remember Me
Email:
Password:


>>>> Hidden Text <<<<

***********************************************************************************

Password Field Summary:
=======================


>>>> Window <<<<
Title:    QUAKE LIVE Launcher
Class:    WindowsForms10.Window.8.app.0.33c0d9d
Position:    308, 105
Size:    750, 517
Style:    0x16010000
ExStyle:    0x00050000
Handle:    0x00030362

>>>> Control <<<<
Class:    WindowsForms10.EDIT.app.0.33c0d9d
Instance:    2
ClassnameNN:    WindowsForms10.EDIT.app.0.33c0d9d2
Name:    f_password
Advanced (Class):    [NAME:f_password]
ID:    197398
Text:    
Position:    343, 462
Size:    150, 20
ControlClick Coords:    73, 10
Style:    0x560100E0
ExStyle:    0x00000200
Handle:    0x00030316

>>>> Mouse <<<<
Position:    724, 577
Cursor ID:    0
Color:    0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
12/23
Support Holiday Break
12/18
Holiday Content Online
12/10
Update 22 Follow-up
12/08
Quake Live Non-recurring Subscription...
QUAKE LIVE is Online.
Latest News
Server Status
Remember Me
Email:
Password:


>>>> Hidden Text <<<<


***********************************************************************************

PLAY Button summary:
====================

>>>> Window <<<<
Title:    QUAKE LIVE Launcher
Class:    WindowsForms10.Window.8.app.0.33c0d9d
Position:    308, 105
Size:    750, 517
Style:    0x16010000
ExStyle:    0x00050000
Handle:    0x00030362

>>>> Control <<<<
Class:    WindowsForms10.Window.8.app.0.33c0d9d
Instance:    1
ClassnameNN:    WindowsForms10.Window.8.app.0.33c0d9d1
Name:    f_login
Advanced (Class):    [NAME:f_login]
ID:    197476
Text:    
Position:    660, 427
Size:    87, 88
ControlClick Coords:    48, 34
Style:    0x56000000
ExStyle:    0x00000000
Handle:    0x00030364

>>>> Mouse <<<<
Position:    1016, 566
Cursor ID:    0
Color:    0x7E0605

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
12/23
Support Holiday Break
12/18
Holiday Content Online
12/10
Update 22 Follow-up
12/08
Quake Live Non-recurring Subscription...
QUAKE LIVE is Online.
Latest News
Server Status
Remember Me
Email:
Password:


>>>> Hidden Text <<<<
Please help me write a autoit script for these things.

Thanks for your help.

Edited by Melba23
Added tags

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Can anyone please tell me how to write autoit script for the provided summary in my previous post (above one)?

 

Thanks in advance.

Edited by Naveen1234

Share this post


Link to post
Share on other sites

@john Hi John, Can you please help me on this. I am in critical project. Can you please tell me how to write autoit script for the above scnerio?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Naveen1234,

 

QUAKE LIVE Launcher

You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game launching - before you post again. Thread locked. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0