oraz / selenium Goto Github PK
View Code? Open in Web Editor NEWselenium tests
selenium tests
Hi there.
Using PageObject with @findby List<Class<? extends Element>> and List<Class<? extends Container>> ExtendetFiledDecorator returned null for this lists.
I suppose that, i need add methods decorateListElements and decorateListContainerin to ExtendedFieldDecorator, and add some implementation in DefaultElementFactory and DefaultContainerFactory? but i don know how do this.
Please, can you help me with this trouble?
Hi Oraz,
Thanks for your sharing sample project on how to custom personal Element type and make @FindBy
is works on custom personal Element type.
As I can't find any contact information of you in GitHub, so I am paste a issue here for asking some more complex personal Element Type.
I would like custom my Element type with a description field, to store this element's description, so that I can fetch back in page action in test report, for example in ReportNG reporter.
for example:
Public class MyWebElement extends Element {
Private String description;
Private WebElement webElement;
public MyWebElement(WebElement webElement) {
this.webElement = webElement;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return this.description;
}
}
and passed the description value to the Element
@Description
below:public class HomePageObjects {
@FindBy(id = "sumbit")
@Description("Home Page: [Submit] button")
public MyWebElement submitButton;
}
public class HomePageObjects {
@MyFindBy(id = "sumbit", description = "Home Page: [Submit] button") // this is custom @FindBy
public MyWebElement submitButton;
}
so that can add test operation information to test report, for example, ReportNG:
public void click(MyWebElement e) {
reporter.log("Click: " + e.getDescription());
e.click();
}
could you provide some more guide to me to implement my expectation?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.