微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

当下一步是 SendKeys(Keys.Alt + Keys.NumberPad9 + Keys.NumberPad2 + Keys.Alt) 时,在 Appium (C#) 中删除文件路径的开始

如何解决当下一步是 SendKeys(Keys.Alt + Keys.NumberPad9 + Keys.NumberPad2 + Keys.Alt) 时,在 Appium (C#) 中删除文件路径的开始

嗨,我对这个间歇性问题感到非常沮丧,试图在文件资源管理器窗口中输入文件路径 - 它可以正常工作几个小时,然后继续删除第一步的键 (W:) 然后发送其余的很好的路径。我试过等待,但无论如何都没有区别,似乎没有选择何时要重新开始工作。 代码如下 - 有没有人对可能导致和/或解决此问题的原因有任何建议?

命名空间 PapercloudElite { 公共部分类 FileExplorer {

    public static void EnterDirectoryPathField(string dirPath1,string dirPath2,string dirPath3)
    {
        Actions actions = new Actions(_driver);
        actions.SendKeys(Keys.Delete);
        actions.SendKeys(dirPath1);
        actions.SendKeys(Keys.Alt + Keys.NumberPad9 + Keys.NumberPad2 + Keys.Alt);
        actions.SendKeys(dirPath2);
        actions.SendKeys(Keys.Alt + Keys.NumberPad9 + Keys.NumberPad2 + Keys.Alt);
        actions.SendKeys(dirPath3).SendKeys(Keys.Enter).Build().Perform();
        Thread.Sleep(2000);
    }
The test step affected is as below:

**FileExplorer.EnterDirectoryPathField("W:","AutomationTestDocuments","GeneralDocs");**

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。