2

I want to write script for a screen where there are two fields and I just want to test with different possibilities of values for those fields, whether it will navigate to further screen. But combinations of data to enter into these fields is too large. So can I import data from excel/any other file where my data is already stored?

San27
  • 223
  • 2
  • 7

1 Answers1

2

Yes it is possible. You can acquire every data that you are able to acquire in a bash script. Write a script file that prints the desired information to the standard output. For example

#!/bin/bash
cat myfile

You can run this bash-script from UIAutomation and get the output of it with this command

var result = target.host().performTaskWithPathArgumentsTimeout(full_path_to_your_script, [""], 10);

Now your can use the output of your bash script:

element.setValue(result.stdout);

Refer fabe's answer here, https://stackoverflow.com/a/19016573/344798

Refer https://stackoverflow.com/a/20626488/344798

Community
  • 1
  • 1
coder284
  • 831
  • 1
  • 13
  • 34