Mikhail,

Selenium has a special attributeLocator and it is in the format of

xp...@attribute

The bad thing is that it is not a valid xpath expression. I think that
is why you
cannot find the object if you try to use it directly in some tools
such as XPather.

I think the fix should work if you call the getAttribute method.

Please see the testcase, testGetAttribute(), in
GoogleStartPageJavaTestCase.java.

Thanks,

Jian

On Jan 13, 12:34 pm, Mikhail Koryak <[email protected]> wrote:
> Jian,
> I tested this change and it is not working for me. The new xpath that
> is generated cannot be found on page.
>
> What is interesting, is that if i change the xpath to:
> //descendant-or-self::d...@id="filterSortBox"]/descendant-or-
> self::sele...@name="secondary_group_by"]/self::node()[...@disabled]
> (notice the square brackets around disabled)
> this xpath evaluates correctly in xpather firefox plugin, but when i
> made the change in the code selenium reports the following error:
>
> Command request: getAttribute[//descendant-or-self::div
> [...@id="filterSortBox"]/descendant-or-self::select
> [...@name="secondary_group_by"]/self::node()[...@disabled], ] on session
> 364237
> 12:23:02.394 INFO - Got result: ERROR: Selenium failure. Please report
> to the Selenium Users forum athttp://forums.openqa.org, with error
> details from the log window.  The error message is: The expression is
> not a legal expression. on session 364237
>
> also, isDisabled and isEnabled functions will need to be changed in
> UiObject to use this fix.
> Do you have any idea what can be wrong?
> Ill poke around some more, if i cant figure it out ill make a testcase
> to demonstrate the behavior
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to