Closed David-Paterson closed 6 years ago
Is the issue when getFollowedByKeys() returns an empty list, or when you provide a value?
It happens for both.
If the list is empty it blanks the value completely.
If the list contains a Key such as Right or Tab or Return, the value is replaced by an undisplayable char.
Could you try with this action instead:
public class EnterValueIntoTarget extends EnterValue {
private Target target;
public EnterValueIntoTarget(String theText, Target target) {
super(theText);
this.target = target;
}
@Step("{0} enters '#theText' into #target")
public <T extends Actor> void performAs(T theUser) {
target.resolveFor(theUser).type(theText);
if (getFollowedByKeys().length > 0) {
target.resolveFor(theUser).sendKeys(getFollowedByKeys());
}
}
}
That works on the device farm using remote driver 👍 and on the local android driver.
The patch fix's the issue.
Sorry was closed in error.
Doing further tests the keyboard popup seems to be inconsistent.
So this is an issue with the Appium Driver?
It may well be, not sure as I get the inconsistent result using both the action and the work-around.
Anyway, the original issue is fixed thanks :)
It will be in the next release :-)
I have found that setting the following prevents the soft keyboard from being displayed on Android not sure if it works for iOS.
serenity.driver.capabilities="unicodeKeyboard:true;resetKeyboard:true"
When using EnterValue action the first call to sendKeys works and the value is entered correctly.
However, the second call to sendKeys using an empty followedByKeys list blanks the correct value entered.
I have tried adding Key Up, Key Right, Tab and Enter all replace the correct value with an undisplayable character.
My action:
Work-around:
Platform: Android Serenity: 1.6.0 Appium: 1.6.5