Select/Select1/Range Value

0 views
Skip to first unread message

Scott

unread,
Jul 2, 2009, 7:42:19 PM7/2/09
to ubiquity-...@googlegroups.com
Hi group,

A recurring problem I've been having while fixing Selenium drivers is
grabbing values from the more exotic form controls. As this issue is
causing the failure of at least a dozen automated tests, I'd be very
interested to know if anyone has a solution for verifying the value of
a select, select1, or range control. The current method in use is to
execute verifyValue on an XPath similar to:
/html/body/xforms:select/pe-value/input, however this always returns
an empty string. As this pattern is present within just about every
driver that uses a select/select1/range it leads me to believe that
this was once the accepted functionality. Has this feature been
accidentally broken, or is this simply a problem with the drivers? In
any eventuality, could someone please explain the proper method for
returning these values within Selenium?

A similar issue impeding test 4.6.1.a2 is that the method for changing
the value of a range control was unknown when the driver was authored.
I suspect this will be a little harder to resolve, or perhaps even
indomitable, as unlike other controls you cannot evaluate an XPath in
order to obtain a DOM element on which to simulate a click. This is in
part because the location of the click with respect to the range, and
even the slider's current position, is paramount. Any help in these
regards would be most appreciated, and should bolster conformance
considerably.

Thanks,
Scott

Phil Booth

unread,
Jul 3, 2009, 8:24:37 AM7/3/09
to ubiquity-...@googlegroups.com
Hi Scott,

Although, I can't answer your first question about select/select1, I
can help on the range one. It is not ideal because it relies on
implementation detail, but the part of the range you want to click on
has @id="slider-thumb0". The driver pages in section 8.1.7 demonstrate
controlling a range control from Selenium, using that.

Phil.


2009/7/3 Scott <fil...@gmail.com>:
--
Phil Booth, webBackplane
phil....@webbackplane.com
http://webbackplane.com/phil-booth

Mark Birbeck

unread,
Jul 5, 2009, 6:15:38 PM7/5/09
to ubiquity-...@googlegroups.com
Hi Scott,

I don't want to be too hard on those who set these tests up in the
first place, but I have to say that the technique you describe has
never been the "accepted functionality" -- as you've discovered, it's
just way too flakey.

A much better solution is to use the xxxXformsControlValue Selenium
extensions that were added a while back. I thought they had been
documented, but I see that in the CreatingSeleniumEndToEndTests wiki
page, there is a reference to waitForXformsControlValue, but it's not
very clear.

So I've added a new page called SeleniumUserExtensions, which we can
use to collect information about our extensions, and I've added some
information that will hopefully help you.

Regards,

Mark
--
Mark Birbeck, webBackplane

mark.b...@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)
Reply all
Reply to author
Forward
0 new messages