Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

Selenium with WebDriver - extensibility of classes #3495

Open
@lukeis

Description

@lukeis

Originally reported on Google Code with ID 3495

Hi,

we use Selenium RC for a while and we plan to migrate to the new Selenium with the
WebDriver API. Also, we plan to use the Page Object paradigm in writing our tests.
We decided to use the PageFactory to create the "pages" and doing initialization with
the FindBy annotation.
For finding some of the web elements we need to use our internal language translation
service, thus, we decided to create our own FindBy annotation and to use it where it
is needed instead of the existent one. For this, we extended PageFactory and DefaultFieldDecorator.
We also wanted to extend the classes DefaultElementLocatorFactory, DefaultElementLocator
and Annotations, but unfortunatly we were facing problems: in the case of the Annotations
class, the member field is private, it is needed by the constructor and has no getter.
DefaultElementLocatorFactory's searchContext is also private, without a getter/setter.
I would like to ask why are these constraints? What is the reason the classes are so
hard to extend? What could we do if we want to avoid the copy + paste pattern?

Thanks,
Zolta.

Reported by zzolta on 2012-03-05 14:06:45

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions