I need help about if...then statement in keyword testing. I'va an form where an column contains two LOVs i.e., Yes & No. When user select Yes more additional fields are appearing and if user select No it remains normal. I'm confused how to handle such scenario via if...then statement.
If a user selects "Yes," an additional two to three dependent fields appear below it. If "No" is selected, the form proceeds normally without displaying these additional fields.
I think an 'If Object' after TC clicks Yes would work. The' If Then' block may not be what you want?
If a user selects "Yes," an additional two to three dependent fields appear below it. If "No" is selected, the form proceeds normally without displaying these additional fields.
I think an 'If Object' after TC clicks Yes would work. The' If Then' block may not be what you want?
... I would guess you want to verify something does or does not exist in which case a checkpoint that returns true or false would be useful to put in your If, Then block....
Get back to us with the behavior you are trying to test if you are still stuck. Pass me a like 👍🏼or set this as resolved if I gave you the info to answer your question.
I am currently conducting system testing for a web-based application. During this process, I’ve encountered a dynamic form scenario where the visibility of certain fields depends on user input in another fields.
Specifically, there is a field called "UOB" with a drop-down list containing "Yes" and "No." If a user selects "Yes," an additional two to three dependent fields appear below it. If "No" is selected, the form proceeds normally without displaying these additional fields.
I am using TestComplete for keyword testing and am unsure how to properly handle this conditional field behavior. Could you advise on the best approach or relevant TestComplete keywords to manage such dynamic UI changes.
You'll get the sample website appearing on the right hand side,
Keyword Test - the conditional if-statement reads like so: If Aliases.selectIsUob.wText == "No" Then Log Aliases.textboxBankBranch.Text Else Log Aliases.textboxUobBranch.Text
It will either display "NatWest" if UOB equals "No", or it will display "UOB Singapore Main Branch" if UOB is not equal to "No".
Remove "selected" from line 17 and insert it on line 18, and click 'Run >'. Run the keyword test again.