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

Discovered issues #95

Open
hazyone opened this issue Oct 29, 2024 · 3 comments
Open

Discovered issues #95

hazyone opened this issue Oct 29, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@hazyone
Copy link

hazyone commented Oct 29, 2024

While trying to connect Playwrightium as an alternative Selenide backend, faced with some issues.

Remote constructor should use tracing option too (somewhere in, at this moment it is not mapped).

public PlaywrightiumDriver(String connectUrl, PlaywrightiumOptions options) {

You should be ready for unexpected behavior and catch PlaywrightException on any page/context api calls. I had unexpected close fails, because Selenide tried gracefully close page that is crashed or something like this.

====
You should check, that this is non-empty string, or this charseq not consists of any "control" symbols. In other way, you will try to fill non-input field with "Escape" and this will cause PW error.

Not safe, can cause exception. Also, if href is not presented, you should return null to have valid href checks in Selenide side.

return locator.evaluate("node => node.href").toString();

Not sure, why are you trying to do getAtrribute again, but this is not safe too. In case of attributes with delimiters (aria-*, for example), you will get an error here, because you can't reference node attribute this way if it has delimiter.

attributeValue = (String) locator.evaluate("node => node.%s".formatted(name));

You should add check, that element type attribute is: type.equals("radio") || type.equals("checkbox"), in other case, you will face an error from PW, when Selenide will try to Describe you input element.

And also exists Selenide check is broken, while connecting this library, so every exists check should be refactored to visible or anything else

I liked your approach, hope my finds will help you. But we will move forward, even after these fixes it is very unstable to use Selenide with alternative backend, because of lot of hacks on their side :)

@britka
Copy link
Owner

britka commented Oct 29, 2024

@hazyone Hello there. I'm glad that you and your team have spent some time to integrate my approach on real project. Or at least check the functionality.
I cannot but mention that this is not solution for Selenide. This is an implementation of WebDriver interface. Selenide is build on the top of Selenium.
But I'll look into this issues and try to fix them.

@hazyone
Copy link
Author

hazyone commented Oct 29, 2024

Yes, I understand the difference. That's why I made a remark that this is a view from the side of a person who tried to use the library together with the Selenide wrapper and also I found this library in an article on medium where connection to Selenide is mentioned :)

I just pointed out, that Selenide is huge and has a lot of hacks, that make migration very difficult.
But in case you work with "clean" Selenium, I think that your library can be a game changer for the teams that are wondering to switch to PW.
Nice work! :)

@britka
Copy link
Owner

britka commented Oct 29, 2024

@hazyone Thank you. That was the point why I began working on Playwrightium. The idea was to keep using Selenium/Selenide but run tests within Playwright.
You comments are unpriceable.
I'll try to fix all that issues.
If you find something new please let me know.

@asolntsev asolntsev added bug Something isn't working help wanted Extra attention is needed labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants