rbvoorheis
Technical User
I'm sure this is very simple. I'm just relatively new to this and I've spent about 6 hours on it now. =o(
I'm trying to use a Select Case statement to access a WebElement which is a text question on a web page. Based on the content or name of this WebElement, I want to click a particular answer button.
Thanks in advance to anyone who can help me.
Here is the code...
InvokeApplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE
'Click Start Button.
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("Start The Game").Click
'Answer Questions.
For Questions = 1 To 20
Select Case Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebElement???
Case "In which city is Wolters"
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("Conshohocken, Pennsylvania").Click
Case "NASS stands for…"
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("North American Shared").Click
Case Else
Print "No Answer"
End Select
Next
I'm trying to use a Select Case statement to access a WebElement which is a text question on a web page. Based on the content or name of this WebElement, I want to click a particular answer button.
Thanks in advance to anyone who can help me.
Here is the code...
InvokeApplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE
'Click Start Button.
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("Start The Game").Click
'Answer Questions.
For Questions = 1 To 20
Select Case Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebElement???
Case "In which city is Wolters"
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("Conshohocken, Pennsylvania").Click
Case "NASS stands for…"
Browser("Wolters Kluwer Brain Game").Page("Wolters Kluwer Brain Game").WebButton("North American Shared").Click
Case Else
Print "No Answer"
End Select
Next