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

Add namespace context for Saxon compatibility #503

Merged
merged 10 commits into from Jul 8, 2020
Merged

Add namespace context for Saxon compatibility #503

merged 10 commits into from Jul 8, 2020

Conversation

andruhon
Copy link
Contributor

@andruhon andruhon commented Jun 23, 2020

A fix for #486

Purpose of changes

The WebdriverManager has recently stopped working with Saxon. This change adds namespace context to make it work with Saxon xPath factory.

Types of changes

  • Bug-fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

I created a custom build for our test suite to make it work. It works in our teamcity.

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2020

Codecov Report

Merging #503 into master will decrease coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #503      +/-   ##
============================================
- Coverage     73.35%   73.19%   -0.17%     
- Complexity      580      587       +7     
============================================
  Files            28       28              
  Lines          2004     1992      -12     
  Branches        245      244       -1     
============================================
- Hits           1470     1458      -12     
- Misses          409      415       +6     
+ Partials        125      119       -6     
Impacted Files Coverage Δ Complexity Δ
...ava/io/github/bonigarcia/wdm/WebDriverManager.java 78.24% <100.00%> (-2.67%) 148.00 <2.00> (+1.00) ⬇️
...b/bonigarcia/wdm/managers/ChromeDriverManager.java 84.61% <100.00%> (+11.64%) 20.00 <2.00> (+3.00)
...ia/wdm/managers/InternetExplorerDriverManager.java 72.22% <100.00%> (+3.47%) 12.00 <3.00> (+2.00)
.../wdm/managers/SeleniumServerStandaloneManager.java 73.68% <100.00%> (+3.09%) 13.00 <3.00> (+2.00)
...arcia/wdm/online/S3BucketListNamespaceContext.java 100.00% <100.00%> (ø) 7.00 <7.00> (?)
...a/io/github/bonigarcia/wdm/cache/CacheHandler.java 78.78% <0.00%> (-9.10%) 8.00% <0.00%> (-1.00%)
...ithub/bonigarcia/wdm/versions/VersionDetector.java 40.54% <0.00%> (-4.51%) 12.00% <0.00%> (-4.00%)
...n/java/io/github/bonigarcia/wdm/config/Config.java 73.70% <0.00%> (-0.62%) 113.00% <0.00%> (-2.00%)
.../io/github/bonigarcia/wdm/online/BitBucketApi.java
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f92abe...47bff98. Read the comment docs.

@bonigarcia
Copy link
Owner

I never saw this problem happening. How can it be reproduced?

@andreikondratev
Copy link

In order to have this issue the Webdriver Manager has to be used in project with Saxon which by default respects xml namespaces.
It was working fine, but I think the XML at https://chromedriver.storage.googleapis.com/ has recently changed and now has the S3 namespace http://doc.s3.amazonaws.com/2006-03-01.

@bonigarcia
Copy link
Owner

@andreikondratev I tried to reproduce this issue but I cannot. I created a new project using Selenium WebDriver and WebDriverManager, available here: https://github.com/bonigarcia/webdrivermanager-basic

Then, I added the Saxon dependency to the project, but the tests are still running nicely:

        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>10.1</version>
            <scope>test</scope>
        </dependency>

Any clue about how to reproduce the issue with this setup?

@andruhon
Copy link
Contributor Author

andruhon commented Jul 5, 2020

Hi! Can this be a difference of Saxon-HE and Saxon-PE? Let me try this project with Saxon-PE.

@xlemmingx
Copy link

xlemmingx commented Jul 8, 2020

Can confirm this issue occuring with this saxon dependency:

        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>9.5.1-8</version>
        </dependency>

@bonigarcia
Copy link
Owner

@xlemmingx Yes, I tried to reproduce the error with that version of Saxon-HE, thank you.

Thanks a lot to everyone for contributing. I am merging this PR.

@bonigarcia bonigarcia merged commit cbe318f into bonigarcia:master Jul 8, 2020
@andreikondratev
Copy link

Sorry I didn't help to test the quickstart. School holidays knocked me out.

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

Successfully merging this pull request may close these issues.

None yet

5 participants