Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


February 12, 2009 - WinTask - SelectHTMLItemByValue (undocumented function)

Posted in WinTask


'
' SelectHTMLItemByValue - selects an item in a Combobox/Listbox within a Web page.
'      This undocumented function is like SelectHTMLItem(), except
'      that it selects by value rather than item text.

 

'

' ret=SelectHTMLItemByValue(,item$[,shift|ctrl])

'


' go to http://www.w3schools.com/TAGS/tryit.asp?filename=tryhtml_option
'
' Paste in the following, and click "Edit and Click Me >>":

'  <html>
'  <body>
'  <select name="MySelect" size=4 multiple="multiple">
'    <option value="a">Volvo</option>
'    <option value="b">Saab</option>
'    <option value="c">Mercedes</option>
'    <option value="d">Audi</option>
'  </select>
'  </body>
'  </html>

'
' Then run this script

'

 

UsePage("Tryit Editor v1.4")
    SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "a")
    SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "b", shift)
    SelectHTMLItemByValue("SELECT[NAME= 'MySelect']", "d", ctrl)




Any comments on this article?
Email Me


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now