This repository has been archived by the owner on Jun 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4e2fa0a
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.
Ummm, I think Browser.new just always infinite loops now.
4e2fa0a
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.
For which driver are you seeing this behavior? Or did you just think that it does it by looking at the code?
4e2fa0a
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.
4e2fa0a
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.
Can you show the code? I'm suspecting that you're requiring
watir-webdriver
manually.4e2fa0a
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.
Hmm, here's the factory we use to make browsers sessions:
4e2fa0a
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.
And where are you using
watir
gem? Do you have it in yourGemfile
orGemfile.lock
file?4e2fa0a
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.
Yes, it's in the Gemfile (and therefor also in the lock file).
4e2fa0a
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.
The problem is that you're manually loading
watir-webdriver
thuswatir
Browser#initialize
will not be overridden. You could avoid that by loading the driver manually.Also make sure that in the
Gemfile
is onlywatir
and notwatir-webdriver
.I agree that there should be some more cleverness built into
watir
gem to avoid this kind of problems.Does this work for you?
4e2fa0a
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.
Please create an issue here https://github.com/watir/watir/issues
4e2fa0a
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.
@jarmo that worked thanks. I think as long as you update the README to indicate that 'watir-webdriver' should never be explicitly required it would probably be fine.
4e2fa0a
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.
This is quite a hacky override chain.
There ought to be less cleverness.
watir/watir#24
4e2fa0a
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.
@jbielick totally agree with you. However, at the time I wanted to create a solution which would not have any backward-incompatible changes when using gem watir (now watir-classic).
Thinking of it now maybe backward-incompatible solution would have been better since it would not have been hacky :)
In long term plans this problem will resolve itself since this gem is planned to be deprecated and replaced with watir-webdriver gem instead.
4e2fa0a
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.
@jarmo makes sense. In this case it's somewhat isolated to
watir-rails
usage I suppose so just FYI!