-
Notifications
You must be signed in to change notification settings - Fork 116
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
ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementDecorator error with custom ElementLocatorFactory #78
Comments
Can you please link the code line you're talking about here? |
In that line the |
no, instance of
constructor where default |
In that case, child elements will be initialized by using default( |
yep, i see now, that's a tricky piece... can you please share a problem you are trying to solve with custom ElementLocatorFactory? so i can write the test and propose solution? or you can write failing test describing your problem and pull request it. |
I want to add possibility to change timeOutInSeconds parameter |
If I remember correctly there was a task for making that value configurable on per-element basis. |
yep, here is abandoned PR #63, you can fix all the problems here and we'll merge it |
please, see #82 |
@artkoshelev are there any updates in #82? |
@emaks will look at it in a few days, thank you |
I was just about to raise an issue on this myself as have struck the same problem on work related to issue #56. Any idea when a new version might be released? |
@andrew-sumner which issue you are talking about? |
I have a custom decorator called that I use to initialise the page elements but this decorator is not passed onto inner elements.
I've ended up working around the issue and have included the code so you can see what I've had to do to implement this. It consist of two classes:
The web app that I am testing is, well bloody awful to be honest. It has up to four levels of nested iframes and is written using Dojo so is heavy with Ajax requests and I've found I've had to be very selective around where I create some of the components to avoid StaleElementReference and NoSuchElement exceptions. I have two remaining issues with my implementation of the decorator that you may be able to help with:
NOTE: I haven't looked at TypifiedElements as I don't use those much. PageObjectAwareHtmlElementDecorator
PageObjectAwareHtmlElementsLoader
|
@andrew-sumner Have you succeeded to overcome these issues? I am trying to make the solution #56 work, however, I am facing with same problems that you have mentioned above. So, I would be very grateful for any assistance or solution from your side. |
I have, I’ll post a link to the code tomorrow.
On 27/08/2019, at 7:33 AM, IZaiarnyi <[email protected]<mailto:[email protected]>> wrote:
@andrew-sumner<https://github.com/andrew-sumner> Have you succeeded to overcome these issues? I am trying to make the solution #56 <#56 (comment)> works, however, I am facing with same problems that you have mentioned above. So, I would be very grateful for any assistance or solution from your side.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#78?email_source=notifications&email_token=ACB74KBJDREN43ZC5HAMHKDQGQVZTA5CNFSM4A7BJ2N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FNQXQ#issuecomment-524998750>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACB74KBLYXOL3MB7MP63QKDQGQVZTANCNFSM4A7BJ2NQ>.
|
This is my impletentaion, not sure if it will help you or not. I've been meaning to try to get these merged back into this project but haven't yet looked to see if I can maked it generic enough and other things always take priority... |
Thank you, it has helped me a lot.
|
when I try to initialize page elements with custom ElementLocatorFactory, like
in
private <T extends HtmlElement> T decorateHtmlElement(Class<T> elementClass, ClassLoader loader, ElementLocator locator, String elementName) { }
functionwhen
PageFactory.initElements(new HtmlElementDecorator(elementToWrap), htmlElementInstance);
line is executed will be used default HtmlElementLocatorFactory classThe text was updated successfully, but these errors were encountered: