首页 > 解决方案 > 如何在 C# 中以编程方式启动 atmx 文件?

问题描述

有人可以告诉我为什么我执行 atmx 文件的代码行不起作用吗?打开 Internet Explorer 后,代码没有走得更远:(

try
                    {
                        switch (status)
                        {
                            case true:
                                IWebDriver driver = new InternetExplorerDriver();
                                driver.Navigate().GoToUrl(@"http://www.rpachallenge.com/");

                                Console.WriteLine("get ATMX file...........");                     
                                string getATMX = String.Format("C:\\Users\\{0}\\Desktop\\VS Test Environment\\Testing.atmx", Environment.UserName);
                                Process.Start(getATMX);   

                                SqlConnection connect = new SqlConnection();
                                connect.Open();
                                SqlCommand 

atmx 文件从 sql 获取信息并填写 rpachallenge.com 上的字段,捕获结束结果然后保存在 sql 中。

标签: c#automationanywhere

解决方案


Atmx 文件在 AAPlayer.exe 上运行,如果您安装了 Automation Anywhere,则可以通过使用 atmx 文件路径调用 AAPlayer.exe 来执行 ATMX。

        Process p = new System.Diagnostics.Process();
        p.StartInfo.FileName = "C:\\Program Files (x86)\\Automation Anywhere\\Enterprise\\Client\\AAPlayer.exe";
        p.StartInfo.Arguments = "/fD:\\bots\\mybot.atmx";
        p.Start();

推荐阅读