Determine type of input element at run time

16 views
Skip to first unread message

Saturn

unread,
Apr 15, 2009, 9:06:35 AM4/15/09
to selenium-ruby
Hi all,

I need to determine type of input element at run time if it's Locator
is known.

e.g.
Suppose I am having id of an element say "id_01" then at run time how
'd I get what type of this element is ?? like text box, select list
etc..

Thanks in advance!

( I am doing this because i want to have a YAML file to keep "Locator"
and it's "value"), so i need to determine it's type so that i could
use .type or .select etc methods to enter data at runtime.

Upendra Patel

unread,
Apr 16, 2009, 4:13:12 AM4/16/09
to seleni...@googlegroups.com
Hi Saturn,
 
u can get type of input element by using following script:
 
@selenium.getvalue(id=id_10@type)


--------------------------------------------------------------------

Saturn

unread,
Apr 16, 2009, 6:54:24 AM4/16/09
to selenium-ruby
Hi Upendra,
i tried as you have mentioned but couldn't get it. Selenium is
generating syntax error. I am using "selenium-remote-control-1.0-
beta-2".

Could please explain this.
@selenium.getvalue(id=id_10@type)
Reply all
Reply to author
Forward
0 new messages