Forum Discussion
Check out this information: https://support.smartbear.com/viewarticle/75022/
Thanks!!
I try parameterization for property checkpoint with excel sheet. It get parameterized with expected value and run successfully. Thanks for it.
But my problem is still arrive because I try to check label value for different users so I required parameterized both actual and expected value for any particular object(label).
as an example I login with first user and it shows label "first user" and after that login with second user and check label "second user" with the checkpoint(record and play).
So in my recording I want to record one time script for one user and try to data loop for many users to test the correct login.
Thanks,
Shailesh
- djadhav10 years agoRegular Contributor
Here is an example of a script recording I did and added a property checkpoint
FUNCTION check_Username(userid) { aqObject.CheckProperty(Aliases.browser.pageHtmlFormTag.lbl_LoggedInUser, "contentText", cmpContains, "userid"); }In the example above the first value (actual value) of 'Aliases.browser.pageHtmlFormTag.lbl_LoggedInUser' will automatically change according to the user that is logged in. You don't need to change that value.
All you need is pass the parameterized (expected value) to this function to use the checkpoint.
- shailesh_singh10 years agoOccasional Contributor
Thanks djadhav.
I did the same but on other/second user it shows actual value of the recorded "first user" and expected value shows as per excel sheet.
Aliases.browser.pageSimulationiqHome.formAspnetform.textnodePageheaderLblusername, "contentText", 0, KeywordTests.Test3.Variables.DataLoop("Loginuser"), False
It shows first user pass " admin" / "admin".
and second user fail "admin"/ "faculty".
but in our requirement we don't want to record checkpoint for every user.Can we do it to parametrized actual values also "Content text" becaues object (textnodePageheaderLblusername) is same for every user and content text property values are different so it should (get update automatically as per user object ) but it saves the value as we have in recording.
Thanks!!
- djadhav10 years agoRegular Contributor
Try adding a step before you use the checkpoint to refresh the mapping information as below.
Aliases.browser.pageSimulationiqHome.formAspnetform.RefreshMappingInfo
Also, try pausing the test on the checkpoint and investigate with the object spy what is the contentText of the object.