Hi Manisha,
U can follow the below approach, its a generic approach and can handle the n number of question in n number of scenarios
1) Create a .xls file containg the questions and their respective answers.(attached is the .xls for refrence)
2) Load the .xls to ur global or local data table.
3) Count the number of questions in a given scenario(U can use DP), store it in a variable say vb_QuesCount
4) Start a for loop for the number of questions in a scenario
5) Using the GetRoProperty find the name of first element (name of 1st question since u are using DP it won't be a problem),vb_QuesText
6) Search through the 1st column of the datatable where .xls is loaded and check if question exists in datatable or not.
7) If question exists then get the answer value for that particular question from datatable say in variable vb_Ans
Code:
Hope this helps u, let me know in case of any issues.
Regards,
Sankalp
U can follow the below approach, its a generic approach and can handle the n number of question in n number of scenarios
1) Create a .xls file containg the questions and their respective answers.(attached is the .xls for refrence)
2) Load the .xls to ur global or local data table.
3) Count the number of questions in a given scenario(U can use DP), store it in a variable say vb_QuesCount
4) Start a for loop for the number of questions in a scenario
5) Using the GetRoProperty find the name of first element (name of 1st question since u are using DP it won't be a problem),vb_QuesText
6) Search through the 1st column of the datatable where .xls is loaded and check if question exists in datatable or not.
7) If question exists then get the answer value for that particular question from datatable say in variable vb_Ans
Code:
Code:
Set Dp=Description.Create()
Dp(xx).Value=??(create description for webRadioGroup)
Vb_quesCount=Dp.Count
For i=1 to vb_quesCount
vb_QuesText=Dp(i).GetRoProperty
‘Code to search the vb_QuesText in datasheet and if exists( This U can do it ur self)
Browser(x).Page(y).webRadioGroup (‘Name :=’&vb_QuesText,’html id:=Question[‘&i&’].Answer.Id’).Select vb_Ans
Next
Hope this helps u, let me know in case of any issues.
Regards,
Sankalp