A - source annotationB - target By locatorpublic interface LocatorBuilder<A extends Annotation,B extends org.openqa.selenium.By>
By implementations.
If you want to implement your own locator annotations, you only have to
create the annotation and marks it with LocatorBuilderClass. After
that you add a new class implements this interface and convert your
annotation to your By implementation.
LocatorBuilder won't be registered as spring bean at startup,
but you can use the spring dependency injection features. If you want to get
an instance, you only have to use following code:
@Autowired
private LocatorBuilderFactory locatorBuilderFactory;
...
locatorBuilderFactory.get(JQueryLocatorBuilder.class);
| Modifier and Type | Method and Description |
|---|---|
B |
build(A annotation)
method to build the locator implementation.
|
Copyright © 2016. All rights reserved.