If we remove the suggested methods and move the sane ones from
RenderedWebElement, we're looking to expand the API of WebElement by 1
or 2 methods. I could live with that.
The problem with RWE is that it reduces the explorability of the API
--- it's not obvious that these methods exist. IME, the most commonly
used method is "isDisplayed", so there is a possibility of just moving
that method and leaving "getLocation" and "getSize" on RWE. As you can
see, I'm still pondering deeply about RenderedWebElement :)
For the python bindings, I'd not bother with the subclass, but I
wouldn't add the deprecated methods, and I'd remove the deprecated
ones from WebElement, if only because Python IDEs don't make it as
easy to explore the API as Java IDEs do, so favouring a flatter class
hierarchy seems to make sense.
Simon
> --
> You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
> To post to this group, send email to selenium-...@googlegroups.com.
> To unsubscribe from this group, send email to selenium-develo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/selenium-developers?hl=en.
>
>
Right. We only have the WebDriver::Element class in Ruby, and likewise
#execute_script is available on Driver without any extra work for the
user (i.e. no JavascriptExecutor). I'm sure there are other examples
of a flatter hierarchy as well.
I am all for a flatter structure but in reality it wouldn't matter for bindings. The question was more an API question since in Java/C# we need to cast to RWE to get the other items when intuitively a webelement is a webelement whether it is rendered or not.
David Burns
On Jan 2, 2011 9:40 PM, "Jari Bakken" <jari....@gmail.com> wrote:On Sun, Jan 2, 2011 at 10:11 PM, Simon Stewart <simon.m...@gmail.com> wrote: > > For the python...
Right. We only have the WebDriver::Element class in Ruby, and likewise
#execute_script is available on Driver without any extra work for the
user (i.e. no JavascriptExecutor). I'm sure there are other examples
of a flatter hierarchy as well.
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" grou...
And, for Jari and posterity, here's a link to the very first version
of the WebDriver interface, as checked in 4 years ago:
Interesting things: the finding elements methods are awful, offering
up a terrible proliferation of methods as mechanisms increased,
there's no way of switching between windows or frames, and executing
Javascript lived on the main interface and couldn't return anything.
Simon
The idea with the advanced user interactions API is that users don't
use Mouse and Keyboard directly. Instead, users should be using the
ActionsChainGenerator to create the more advanced actions. In my head,
I imagine it being used something like:
Actions.with(driver).doubleClick(element).perform();
Essentially, the "Actions" class is a builder, allowing a complex
series of actions to be grouped together:
Actions.with(driver).clickAndHold(By.id("foo"))
.hold(Keys.SHIFT)
.click(By.id("e2"))
.click(By.id("e3"))
.release(Keys.SHIFT)
.dragLeft(100).dragDown(200)
.releaseMouseButton()
.perform();
I'm totally open to reworking the RenderedWebElement, but I'm not
happy with just dumping action methods into it (emphasized for effect:
I know that's not what you meant Jim) I'm also not particularly
pleased with it having a dependency on AWT, though it's hard to come
up with a rational reason for that dislike.
Simon
Simon