aquaman / clr-sessions

Command-line Ruby Session-Based Testing Framework
8 stars 3 forks source link

todo-maker.bat generates an error #14

Closed ingx3470 closed 4 years ago

ingx3470 commented 4 years ago

Hi Paul.

I was following along the install guide steps under the check it section re: making sure session sheets are created. The first step worked fine using the create_new_session.rb in the Submitted folder.

however, when I tried running todo-maker.bat, I got the following:

Traceback (most recent call last): 1: from C:/Sessions/bin/todomaker_win_xls.rb:101:in <main>' C:/Sessions/bin/todomaker_win_xls.rb:101:in[]=': (in OLE method `Visible': ) (WIN32OLERuntimeError) OLE error code:0 in

HRESULT error code:0x8002000e Invalid number of parameters. I am not sure what that all means.
aquaman commented 4 years ago

It looks like the Win32OLE code has changed slightly over the last 10 years. I think I know the fix but I could use your help to check it for me since I don't have access to a Windows system with Excel installed at the moment.

Can you please open the /Sessions/bin/todomaker_win_xls.rb file in a text editor and go to line 101 that reads: excel['Visible'] = false

and change it to: excel.visible = false

And save the change. Then rerun the todo-maker.bat file.

Let me know if this works for you and I will update the code repository with the fix. Thanks.

ingx3470 commented 4 years ago

Hi Paul.

Ran the above steps as requested. Got the following:

Traceback (most recent call last): 1: from C:/Utilities/Sessions/bin/todomaker_win_xls.rb:106:in <main>' C:/Utilities/Sessions/bin/todomaker_win_xls.rb:106:in[]': (in OLE method `Value': ) (WIN32OLERuntimeError) OLE error code:80070057 in

HRESULT error code:0x80020009 Exception occurred.
aquaman commented 4 years ago

I updated the code for bin\todomaker_win_xls.rb that should fix this issue. The newer Win32OLE syntax is cleaner than the old way (see example above). I tested this on a Windows 10 environment running Ruby 2.6.5.

Please download this new file and replace your current one in the bin directory. Rerun the batch file and let me know if you encounter any more errors. Thanks.

ingx3470 commented 4 years ago

Hi Paul.

Hooray! It works! Thanks so much for fixing this!