07-23-2012, 08:57 PM
Dear All,
I am having a webedit box and in my web page which is having around 50 drop downs. I need to select one out of them. The code which I have now is,
1. Taking the value to select from the global data table
2. Check if the value is matching for each and every element in the web edit box i.e I have 50 if conditions
3. Select the value which is matching the value in the global data sheet
I need it to be,
1. Take the value to select from the global data table
2. Select the webedit box element based on the selection
My current code:
'Need to avoid hard coding. The below code is not working
Could you please help me to fix this issue.
I am having a webedit box and in my web page which is having around 50 drop downs. I need to select one out of them. The code which I have now is,
1. Taking the value to select from the global data table
2. Check if the value is matching for each and every element in the web edit box i.e I have 50 if conditions
3. Select the value which is matching the value in the global data sheet
I need it to be,
1. Take the value to select from the global data table
2. Select the webedit box element based on the selection
My current code:
Code:
SchemaType=DataTable.value("Schema_Type",sheet1)
MsgBox SchemaType
If SchemaType="SEALED" Then
Browser("BOAData").Page("CSs").Frame("Frame").WebElement("SEALED").Click
End If
If SchemeType="OPENED" Then
Browser("BOAData").Page("CSs").Frame("Frame").WebElement("CLOSE").Click
End If
'Need to avoid hard coding. The below code is not working
Code:
Browser("BOAData").Page("CSs").Frame("Frame").WebElement(SchemaType).Click
Could you please help me to fix this issue.