automated-testssilktestvisual-testing

Silk Test Visual Test Pressed Enter Key


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) ======


Solution

  • I found the answer! So in properties pane in the .NET Script click the device name under Application Configurations and add ";noReset=true" in Connection String. Then, uncheck "Execute Base State".

    With that, Silk Test will execute the inserted .NET Script in visual test without reinstalling the app.