Closed mountainwest closed 3 years ago
Can you try outputting your execution to a log file, like this: rspec spec/features/book_vaccine.rb > booking.log
and then send the log file here?
Can you also pull the latest and try again? I added a few more log lines.
Will do. Can you confirm: when inputting a preferred site, what should be the value entered in the number of sites to search?
It's whatever you see under the 'Location Name' column in the list here
The following repeats over and over in the log file:
E, [2021-02-22 13:43:35 #17272] ERROR -- : Something major went wrong. Please report this error: wrong number of arguments (given 1, expected 0)
A few samples from my entry:
PREFERRED_LOCATION = 'WESTCHESTER COUNTY CENTER' # Or specify a location like 'JAVITS CENTER' NUM_LOCATIONS = 1 # If no preferred location, find appts at top 3 results REFRESH_INTERVAL = 2 # In seconds
Let me know what more I can provide. Thanks again.
I'll need the output of the entire log file to see how far along the script went. Also what are you seeing in the browser? Did it get past the prescreen?
Let me run again now and then post the log file. Chrome never shows any activity, though I can see activity in the task manager for Chrome related processes. Should I see the browser app open? If so, that is not happening.
Yes, you should see Chrome open and run with a warning in the window that says "Chrome is being controlled by automated test software". Are you certain you completed bundle install
successfully prior to running?
C:\Users\aaa\Desktop\vax>gem install bundler Successfully installed bundler-2.2.11 Parsing documentation for bundler-2.2.11 Done installing documentation for bundler after 7 seconds 1 gem installed
C:\Users\aaa\Desktop\vax>bundle install
Using public_suffix 4.0.5
Using addressable 2.7.0
Using bundler 2.2.11
Using mini_mime 1.0.2
Using mini_portile2 2.4.0
Using nokogiri 1.10.9
Using rack 2.2.2
Using rack-test 1.1.0
Using regexp_parser 1.7.1
Using xpath 3.2.0
Using capybara 3.32.2
Using ffi 1.13.1
Using childprocess 0.9.0
Using diff-lcs 1.3
Using rspec-support 3.9.3
Using rspec-core 3.9.2
Using rspec-expectations 3.9.2
Using rspec-mocks 3.9.1
Using rspec 3.9.0
Using rubyzip 1.3.0
Using selenium-webdriver 3.14.1
Using webdrivers 4.4.1
Bundle complete! 4 Gemfile dependencies, 22 gems now installed.
Use bundle info [gemname]
to see where a bundled gem is installed.
Here is the log file:
@mountainwest it doesn't look like things are getting off the ground for you. Can you pull latest again and try again and share logs? I removed the catch so it should just spit out the entire trace of where things are going bad.
Will do. Thanks again.
Ok, this log I think will prove helpful. Please see attached. Again, thank you.
I'm not really sure what could be wrong. I'd try just a few more things here:
(1) Restart your Windows PC. It's possible that your install is not finding Chromedriver
(2) Check path C:\Users\aaa\.webdrivers
(where "aaa" is what I assume your user name) and see that chromedriver.exe
and chromedriver.version
exist
(3) Try a bundle update
and rerun after. Though bundler can be a pain in the butt if you run into problems here.
I'm sorry I couldn't be much more help here. Typically the repos I put up work across Windows and Mac without problems.
@mountainwest another thing you can try is to change selenium_chrome
in spec/spec_helper.rb
to just selenium
instead. If you have Firefox installed, it will try to run the script from Firefox.
Also I meant to say bundle update
and not bundle install
as a last resort. That may end up fixing things on your side.
Hate to bother you, and grateful for your help. I ran update, and tried again. Same problem. Then I modified selenium, and received a slightly different error. This time, FireFox opened. But, no luck overall. No page opened.
@mountainwest I am trying one more fix that might help.
Please pull the latest, do a bundle install
(not update) and try one more time. Thanks.
Edit (4:13 pm): Be sure to checkout/undo any local changes before doing a bundle install too.
I tried just now on macOS, as well. Still no luck. The only consolation is that the error in the logs appears to be the same on macOS and Windows. See attached.
@mountainwest what version of Ruby are you using? The only thing I can think of is that I haven't tested this on Ruby 3.0+ that was released back in December. I'd recommend trying a 2.x version to see if you have better results. Other than that I can't think of what else it could be.
I think maybe the info you get back to me here might help me figure this out.
@mountainwest One last thing to try. Put this in your CMD or Terminal:
bundle exec rspec spec/features/book_vaccine.rb
That might just be it; I’m using 3.0...
Let me know the optimal version to try, and I’ll give it a go this evening.
Will try that before trying whatever older version of Ruby you suggest. Not back at my desk for a few hours, but will update here after with results. Thanks again.
This will work on Ruby Windows 2.5.5p157 and Mac OS Ruby 2.5.1p57 -- however I feel confident that any 2.x (non-3.0) Ruby version should work.
I will be interested to see if bundle exec rspec
works for you also, because that could help work around any kind of dependency issues that I'm not thinking about.
Your best bet would be to try an older version of Ruby for now. Sorry for the hassle here and thanks for all the quick feedback.
@mountainwest I was able to reproduce the error you were running into while on Ruby 3.0.0
I've updated all dependencies to work on the latest Ruby. Please pull the latest, do a bundle install
, and things should work out.
Sorry for all the trouble! Please let me know if it's now working for you.
Bingo! This worked. Now, the great wait...
Will report back on outcome. Thank you again.
Just cloned the new version a bit ago, and ran it locally. Receiving the following error:
E, [2021-02-22 11:27:11 #5468] ERROR -- : Something major went wrong. Please report this error: wrong number of arguments (given 1, expected 0)
Any thoughts?
Thanks again.