GCuser99 / SeleniumVBA

A comprehensive Selenium wrapper for browser automation developed for MS Office VBA running in Windows
MIT License
89 stars 18 forks source link

64bit/ 32bit / VB6 Compatibility Issues and Suggestions #61

Closed surfer-silver closed 1 year ago

surfer-silver commented 1 year ago

Hope doing you are doing great and enjoying this winters.

I do code for Visual Basic 6 which pretty much same as VBA little modifications will allow to run SeleniumVBA very well in such environment, but the problem is i need to remove and update same code every time when there is an update available.

  1. need to put conditional compilation to some places where ptrsafe (64bit) declaration to 32bit .
  2. vba Application object dont like vb6 so need to modify these lines to custom code to get app paths /local paths.
  3. dll will be good idea and easy will be helpful keep udpate libs in project and less messy but getting some issue during use given classes and modules files are good but with some changes everytime if need to update as i also need to update this source safe made some changes to run your lib in both vb6 and vba if possible release dll/activex
    SeleniumVBA_win64.dll have same issue as mentioned if possible make it more compaible with vb6 environment too like SeleniumBasic its was great but too old and getting so much performance and compatibility issues with new version of browsers mainly support firefox, chrome (hangs frequently) hope you will continue this trend thank you SeleniumVBA_v2.8_VBA_VB6.zip
GCuser99 commented 1 year ago

@surfer-silver,

So if your goal is to maintain a VB6 version of SeleniumVBA going forward with the least amount of effort in the long run, then you may have to consider changing your process. I think you might be in a similar situation as I am in trying to maintain the experimental twinBasic version. So I will share my process in case that is of any use to you.

1) Document EACH change. An example of such documentation is in this discussion. You are welcome to start a similar discussion on this repository on your efforts to make SeleniumVBA into SeleniumVB6. I think that would be useful. 2) Automate-Automate-Automate! Write code to automate the changes. When there are new functional changes to SeleniumVBA source, I simply run a VBA routine to make the adjustments needed for twinBasic. If some adjustments are too complicated for that, then I have a twinBasic module called tBUtils that holds additional or replacement code, and the automate routine simply deletes the SeleniumVBA source that is replaced in tBUtils. You can see my twinBasic source here - all of it was created by my automation process and I had to make no manual changes. 3) Stage your development process. For example, you could take the recent version of SeleniumVBA and make it 32bit compatible in VBA (including thorough testing) while resisting the urge to make any other functional changes. Then share that with this community for inclusion. Once it's been approved, then you would have a better starting place for VB6 conversion, plus you would have solved a problem for others that are running on 32bit Windows.

I know the above requires an up-front investment, but if your goal is to keep your code branch functionally up-to-date with this one, then it will pay off in the longer run.

A couple of random comments:

Have you considered the twinBasic compiler? It is VB6 and VBA compatible and can compile in 64bit.

On the 32bit compatibility - I have given this some thought in the past and wondered what demand there would be for running on older systems. You are the first to ask for 32bit since I started this repo. I'll put it on the list but not sure when we can get to it - busy with a lot of other things right now. As I suggested in 3) above, if you want to try to make the latest version of SeleniumVBA 32bit compatible in VBA and share that with us, including testing on a 32bit version of Office, that would be a good start.

Are you saying that you tried the twinBasic Dll in your VB6 project? I'd be interested in hearing more about that.

Thanks for creating this issue!

EDIT: also feel free to communicate in your native language of choice - I can always use "Translate to English"