Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
7 subscribers
Views
4353 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Completed fields randomly clear when button pressed using automation (FitNesse or Ruby).
martinc410
over 8 years ago
#AppianFitnesse
#GeneralInterest
We have an issue where a field can be populated by FitNesse but when a button (i.e. Submit) is pressed, the field is cleared and the page errors because of the now-empty field. This randomly happens but it is the same field/s it happens to. One is a simple page with text, a field and a button.
Note: I have witnessed this using Ruby as well, so it's most likely an Appian/Sail and not a FitNesse issue.
OriginalPostID-252844
Discussion posts and replies are publicly visible
0
Tom Ryan
Appian Employee
over 8 years ago
It sounds like you may not be saving the value in the field correctly. If you do not persist it to a variable (either a rule input or a local variable), then the field will be empty once you move focus away from the field. If you are unsure, can you attach the example SAIL where you are seeing this issue?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc410
over 8 years ago
Hi Tom, It's a variable that FitNesse writes to the field. Usually it stays there when submit is pressed but not always. My thought is that Sail doesn't know the field is populated as no keypress is performed, though why the field is randomly cleared on a button press is a mystery to me.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
That seems strange, especially if it is only showing this behavior some of the time. Can you attach the SAIL for the form so I can make sure there are no issues there?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc410
over 8 years ago
Hi Tom,
Here's one of the forms:
a!formLayout(
label: "Perform reconciliation",
instructions: "Give application id in the text box and the application financial status will be changed to ""Payment settled"" in about 2 mins.",
firstColumnContents: {
a!textField(
label: "Application id",
instructions: "If application is 1507-1234 SDA, then enter 1234.",
labelPosition: "ADJACENT",
required: true(),
value: ri!int_applicationId,
saveInto: ri!int_applicationId,
refreshAfter: "UNFOCUS",
validations: {}
)
},
secondColumnContents: {
a!textField(
label: "",
labelPosition: "ADJACENT",
value: "",
readOnly: true(),
saveInto: ri!int_applicationId,
refreshAfter: "UNFOCUS",
validations: {}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidgetSubmit(
label: "Submit",
style: "PRIMARY",
value: "Submit",
saveInto: ri!text_buttonAction
)
},
secondaryButtons: {
a!buttonWidgetSubmit(
label: "Cancel",
style: "NORMAL",
value: true,
saveInto: ri!text_buttonAction,
skipValidation: true
)
}
),
validations: {}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
Can you confirm if you are seeing this issue for particular input values? Since the input name is prefixed "int_" I am assuming that the rule input is type integer. With that in mind, we would see behavior similar to what you described if a non-integer value was entered. Eg:
- Enter 12345 -> it persists
- Enter abcde -> it does not
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc410
over 8 years ago
This issue occurs for integer values but only integers are ever input. Note: These integers are grabbed via a regex which returns only ever integers. I have watched FitNesse input the integers and then watched them vanish and have an error message stating "the field should not be blank" returned due to it now being blank.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
If we are inputting the same kinds of values it seems strange that it would work some times and not others. I'm no Fitnesse expert, so hopefully one of the other practitioners on Forum can comment here. I am wondering if there is some race condition here - can you test putting a sleep in after filling the value, before clicking submit? I agree this would not be ideal test design but may be informative as a troubleshooting step.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc410
over 8 years ago
Thanks for the reply Tom. I don't actually think it's a FitNesse problem as the same issues are encountered when using Ruby for the automation. This leads me to believe it's a Sail/Appian issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 8 years ago
That makes sense. I am wondering if you have seen the same issue when testing manually? If it is both FitNesse and Ruby but not manual testing, perhaps the issue is related to SAIL when the tests are automated only.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc410
over 8 years ago
No, this issue has not been observed when performed manually.
My guess it's something to do with Sail not knowing the field has data (as the keyboard wasn't used) Rather it's more like copy/paste for data entry which Sail doesn't always detect. Note: I have a couple of times spotted the error occurring, so I quickly type the data in the field, click Submit and it goes fine from there.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel