Verifying if the web checkbox is selected or not is very easy in QTP.
Below example uses the GetROProperty method to find the checkbox status
status = Browser("ABC").Page("Mypage").WebCheckBox("mycheck").GetROProperty("Value")
If the checkbox is selected then status will have a value - ON
status = Browser("ABC").Page("Mypage").WebCheckBox("mycheck").GetROProperty("Value")
If the checkbox is selected then status will have a value - ON
If the checkbox is not selected then status will have a value - OFF
This is how we can validate if the checkbox is selected or not using QTP.
Example - Using HTML DOM (applies to only web applications)
This is how we can validate if the checkbox is selected or not using QTP.
Example - Using HTML DOM (applies to only web applications)
status = Browser("ABC").Page("Mypage").WebCheckBox("mycheck").object.checked
If the checkbox is selected then status will have a value - true
If the checkbox is selected then status will have a value - true
If the checkbox is not selected then status will have a value - false
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs