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

Support for Unpoly #534

Closed
barrypitman opened this issue Dec 21, 2022 · 8 comments
Closed

Support for Unpoly #534

barrypitman opened this issue Dec 21, 2022 · 8 comments
Assignees

Comments

@barrypitman
Copy link

I'm struggling to use HtmlUnit (via webdriver) to test my application which is using unpoly - unpoly.com.

When you click on links, unpoly will make the request using AJAX instead of a full-page reload, and swap out the old HTML with the new. However, when I try to click on these same links using HtmlUnit, nothing happens, i.e. the original HTML remains in place.

I'm not seeing any errors in the logs either so I don't know where to start looking. There is a demo site - https://demo.unpoly.com/ and I've attached a test case (using HtmlUnitDriver) which demonstrates the issue.

ChromeDriver and HtmlUnitDriver without javascript both work, but HtmlUnitDriver with javascript enabled doesn't work.

unpoly_test.zip

Thanks for a great project!

@rbri
Copy link
Member

rbri commented Dec 21, 2022

ok,will have a look

@rbri
Copy link
Member

rbri commented Dec 21, 2022

good news, looks like the js code is loaded and at least the request for the companies is triggered.
But the page update does not take place. Will be a harder story to understand why....

@rbri rbri self-assigned this Dec 21, 2022
@rbri
Copy link
Member

rbri commented Dec 23, 2022

have set up a local debug environment for this - first found problem is this one (mozilla/rhino#1293)
if merged i have to fix the processing of \n in the htmlunit part of the console processing.

@rbri
Copy link
Member

rbri commented Dec 23, 2022

ok, next step - seems to be a problem with Object.assign - if using the polyfill (line 260) replaces the content.
Will require some time to write a test for this and than the hard part with rhino starts.

@rbri
Copy link
Member

rbri commented Dec 24, 2022

Looks like this solves the problem

mozilla/rhino#780

mozilla/rhino#1242

@rbri
Copy link
Member

rbri commented Dec 27, 2022

Have done a new snapshot build that should fix this. @barrypitman please try and report your findings.

@barrypitman
Copy link
Author

@rbri thank you so much! I have tested with 2.68.0 and its working!

@rbri
Copy link
Member

rbri commented Dec 30, 2022

@barrypitman great - have fun using HtmlUnit

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

2 participants