[
http://jira.openqa.org/browse/WTR-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20054#action_20054
]
Ivan Kabluchkov commented on WTR-469:
-------------------------------------
Sorry, I forgot to add waiter:
{code}
def id
Watir::Wait.until(@timeout) { @element.present? }
@element.id
end
{code}
> Method id doesn't work properly after using when_present extension
> ------------------------------------------------------------------
>
> Key: WTR-469
> URL: http://jira.openqa.org/browse/WTR-469
> Project: Watir
> Issue Type: Bug
> Components: Other
> Affects Versions: 1.6.7
> Environment: Windows7, ruby 1.8.6-26
> Reporter: Ivan Kabluchkov
>
> Method id return id of object instead of DOM-id of element after using
> when_present. For example:
> {code}
> ie.text_field(:class => "some_class").when_present.id # => call Object#id
> method instead of ie.text_field(:class => "some_class").id
> {code}
> It happens because, "id" method presents in WhenPresentDecorator class and
> method_missing method doesn't call
> Workaround for WhenPresentDecorator class:
> {code}
> def id
> @element.id
> end
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development