自动登录第三方应用程序 [英] Automate Login to a Third Party Application

查看:119
本文介绍了自动登录第三方应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,

我正在尝试开发一个自动化的.Net应用程序,它能够登录到第三方应用程序并执行一组当前的工作手动执行

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.

下面是OneDrive代码的链接

Below is the Link to the code in OneDrive

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

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

1。当我运行应用程序时,它在下面的代码行中打破了对象引用错误

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)

这是因为sTexBoxControlList为空。

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。我正在尝试向Handle发送一些密钥以尝试登录但这不起作用。

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}")

你能不能帮帮我。

谢谢提前。

Joji

推荐答案

看看以下内容:

Take a look at the following:

https://msdn.microsoft.com/EN-US/library/dn631817.aspx

谢谢

Frank K [MSFT]

Frank K [MSFT]

在Twitter上关注我们, www.twitter的.com / WindowsSDK

Follow us on Twitter, www.twitter.com/WindowsSDK.


这篇关于自动登录第三方应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆