For firewatir, watir uses getAttribute:

In firewatir/lib/firewatir/element.rb:

413 if(how == \"href\" || how == \"src\" || how == \"action\" || how ==
\"name\")
414 {
415   attribute = element.getAttribute(how);
416 }



I think we should:
- read the attribute from the DOM (through JS, OLE, or whatever...).
  convert it to an absolute URI if it is not.
- take the user's input.
  convert it to an absolute URI if it is not.
- Compare the two.


Also, my initial email last night was pointing out some other issues:
1. Where should we put a unittest for this stuff ?
2. Should browser.element(:xpath, ...) work (currently fails on IE &
firefox) ?
   Or is this something that's deprecated ?
3. Should browser.element_by_xpath(...) work ?
   It currently fails on IE.

Alok

On 4/15/11 9:24 AM, "Jarmo" <jarm...@gmail.com> wrote:

>Agreed that the url should be always relative. I won't dig into code just
>yet, but is your suggested JavaScript getAttribute used by FireWatir
>already? In Watir, i think that the attribute is retrieved directly from
>the OLE element. Not sure of course.
>
>Jarmo

_______________________________________________
Wtr-development mailing list
Wtr-development@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to