0

Let's say there's only one textbox on a page (no confirm button). I have inputted the text. How do I press enter? (in mobile, I can press the "enter" key in the keyboard, but there's no keyboard in visual test). Can anyone please help me?

EDIT

So in the end I used .NET Script. But I can't integrate the script to Visual Test (the app reinstall itself from the beginning). It works if the scenario fully uses .NET Script, but then I need to change all the Visual Test to .NET Script (I need to make it all in Visual Test or .NET Script).

Does anybody know how to integrate this one function in .NET to Visual Test?

Here's my .NET Script:

Imports SilkTest.Ntf.Mobile

Public Module Main

Dim _desktop As Desktop = Agent.Desktop

Public Sub Main()

    Dim map As IDictionary(Of String, Object) = New Dictionary(Of String, Object)()
    map.Add("action", "Done")

    
    _desktop.MobileDevice("Device").Invoke("executeScript", "mobile: performEditorAction", New Object() {map})

End Sub

End Module

====== the script's 'till here (I can't insert it into the code brackets) ======

4

2 回答 2

1

添加一个执行 TypeKeys 的新命令

于 2020-09-25T06:19:47.197 回答
0

我找到了答案!因此,在 .NET 脚本的属性窗格中,单击应用程序配置下的设备名称并在连接字符串中添加“;noReset=true”。然后,取消选中“执行基本状态”。

这样,Silk Test 将在可视化测试中执行插入的 .NET 脚本,而无需重新安装应用程序。

于 2020-10-01T06:00:32.253 回答