0
votes

I have a problem when automate the step to input email address (long list with email separator ; ) at Android Phone.

When perform this action manually, I do these steps:

At To field, use software keyboard, input [email protected];[email protected];[email protected]

the email address will be accepted the moment I pressed ; I could see the proper oval shape at each address which means email address is accepted.

When I use robot to automate it, I did not see the email address accepted like manual way.

*** Variables ***
${RECIPIENTS}         [email protected];[email protected];[email protected];

*** Test Cases ***
Wait Until Page Contains And Click    ${TO-FIELD}
Run     adb shell input text '${RECIPIENTS}'

I have no idea how to make the automation step behave like manual way, is the way I construct Variable or test step wrong?

I can only able to enter text into the field by using adb shell input text. The robot framework built in 'Input Text' does not accept by the device.

2

2 Answers

0
votes

You can try as follow and no need to give semicolon . Pressing enter will create a contact bubble and next email id can be given.

solo.sendkeys("[email protected]")

solo.sendKey(Solo.ENTER)

0
votes

Please let me know what automation frame work you are using ?

If you have list of email address please put in a list array and use any conditional loop

List email[] = {"[email protected]", "abc2.gmail.com"}

for(int i=0 ; i<=email.getSize();i++) {
solo.sendkeys(email.get(i));
solo.sendKey(Solo.ENTER)
}

This sample code helps you optimise the code in loop