-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix for NUTCH-2460 contributed by Hussein Alahmad #245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hussein-alahmad can you also provide the nutch-default.xml options ?
@@ -166,7 +175,7 @@ public static String getHTMLContent(WebDriver driver, Configuration conf) { | |||
public static void cleanUpDriver(WebDriver driver) { | |||
if (driver != null) { | |||
try { | |||
driver.close(); | |||
// driver.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hussein-alahmad Why is this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a driver.quit() statement after it , I was getting an error about trying to close a non existing connection , after searching about it , turned out that driver.quit() alone without the driver.close() do the work
as mentioned here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hussein-alahmad
@lewismc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hussein-alahmad i think including the compatible version of Firefox within the documentation would be wise.
@hussein-alahmad ping |
@lewismc very very sorry for the late reply |
Any plan to merge that? |
The corresponding issue NUTCH-2460 is now marked for 1.16, so it will get reviewed. Thanks, @sbatururimi for the reminder. |
I'm adding more features in NUTCH-2676 also. |
Thanks, @sbatururimi! Let us know whether it still makes sense to merge this PR. Afaics, the requested changes are made and the merge conflicts are easy to resolve. |
Maybe it will make sense to wait till the mid/end of the next week in order to compare how much have been added :). |
Included in #430 / dfd8602. Thanks, @hussein-alahmad and @sbatururimi! |
use the headless option of firefox and chrome in protocol-selenium
the --headless option is added to firefox in version 55 or later , and in chrome in version 59 or later ...
this is much better than relying on xvfb and its associates .
we can add it as a property in the config file .
I'm trying it on my local machine , and will create a pull request when I finish testing it
I've tested it using firefox 57.0 , gecodriver 0.19.1 and selenium 3.7.1
Important note : you need to add the following property to nutch-default.xml or nutch-site.xml for the headless option to work
selenium.firefox.headless true A Boolean value representing if firefox should run headless . make sure that firefox version is 55 or later, and selenium webDriver version is 3.6.0 or later. The default value is false. Currently this option exist for - 'firefox'