Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create PageObject Element based on parameters #4

Open
norberttech opened this issue Jun 5, 2013 · 3 comments
Open

Create PageObject Element based on parameters #4

norberttech opened this issue Jun 5, 2013 · 3 comments

Comments

@norberttech
Copy link
Contributor

Sometimes we have elements that have very same logic but different parameters describes them so its impossible to get them directly from Page Object.
It would be nice to have additional parameter in getElement method in Page class.

$params = array('id' => 'element_id'); 
PageObject\Page::getElement($name, $params);
@jakzal
Copy link
Member

jakzal commented Jun 10, 2014

Page class already accepts parameters as the last argument. How about we make that Element class accepts them too and than both factory methods get an optional argument, like @norzechowicz proposed? This gives us an additional ability to override parameters passed via the configuration at runtime.

@tikolakin
Copy link

Faced the same issue, so it's really useful

@spolischook
Copy link

This improvement can resolve this issue

@SubmeetVet SubmeetVet mentioned this issue Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants