Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Automate Login to a Third Party Application

$
0
0

Hi Experts,

I am trying to develop a .Net Application for automation which is able to login to a third party application and perform a set of jobs which is currently performed manually

I am facing some Issues with the code i have written and need your Expert help.

Below is the Link to the code in OneDrive

https://onedrive.live.com/?cid=1f0b0affb1fd6044&id=1F0B0AFFB1FD6044%213197&ithint=file,zip&authkey=!AN6nBhsF9UX6nqg

1. When i run the Application, it breaks at the below line of code with Object reference Error

DicControl.Add("Password", sTextBoxControlList.Item(0).childHandle)
DicControl.Add("UserName", sTextBoxControlList.Item(1).childHandle)
DicControl.Add("Login", sLogin.Item(0).childHandle)

this is because sTexBoxControlList is empty.

The Weird part is when i debug the Code thru visual studio it passes thru the code with out any issue

2. I am trying to send some keys to the Handle to try to login but this is not working.

    ' Set Control to Password
    NativeWin32.SetFocus(DicControl("Password"))
    SendKeys.SendWait(Password)
    NativeWin32.SetFocus(DicControl("Login"))
    SendKeys.SendWait("{ENTER}")

Can you please help me out.

Thanks in advance.


Joji


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>