WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: stanl on January 12, 2015, 10:22:24 AM

Title: Automate Firefox Through WATIN -STA mode
Post by: stanl on January 12, 2015, 10:22:24 AM
Have a need to automate a web-application but Firefox will work better than IE. You can automate Firefox through the WATIN .net dll - there is C# and Powershell code. However the kicker is that WATIN needs to be run in -sta mode. I'm not sure if, through the CLR, this is even possible with WB.
Title: Re: Automate Firefox Through WATIN -STA mode
Post by: td on January 12, 2015, 10:42:27 AM
Should not be an issue.
Title: Re: Automate Firefox Through WATIN -STA mode
Post by: stanl on January 13, 2015, 09:50:33 AM
Quote from: td on January 12, 2015, 10:42:27 AM
Should not be an issue.

But it is (not a WB issue). I was thinking 7 years ago when I first looked into automating Firefox. WATIN is only good up to FF 3.6 and the latest version is 34.4.... 

I did find a vba/vscript wrapper for Selenium, so I'll look at that route. Hopefully can convert something like below.


Public Sub TC_Browsers()
   Dim driver As New SeleniumWrapper.WebDriver
   driver.start "firefox", "http://news.yahoo.com"
   driver.open "/science"
   driver.open "/politics"
   driver.stop
End Sub 
Title: Re: Automate Firefox Through WATIN -STA mode
Post by: td on January 13, 2015, 10:08:12 AM
Quote from: stanl on January 13, 2015, 09:50:33 AM

But it is (not a WB issue). I was thinking 7 years ago when I first looked into automating Firefox. WATIN is only good up to FF 3.6 and the latest version is 34.4....   

I was referring specifically to WinBatch CLR hosting and the COM Automation subsystem.  More specifically, STAs are not an issue for WinBatch CLR hosting nor the COM Automation subsystem.  That the WATIN business has not been maintained or updated for some time is fairly obvious. 

Speaking of updates, once the new IE for Windows 10 is released, I am sure there will be another great 'wailing and gnashing of teeth'...
Title: Re: Automate Firefox Through WATIN -STA mode
Post by: hdsouza on January 13, 2015, 12:37:05 PM
Not sure if this is completely relevant, but I had started down the path of automating firefox a little while ago and found this .. if it helps
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Automate~FireFox.txt
Title: Re: Automate Firefox Through WATIN -STA mode
Post by: stanl on January 13, 2015, 12:55:45 PM
Quote from: hdsouza on January 13, 2015, 12:37:05 PM
Not sure if this is completely relevant, but I had started down the path of automating firefox a little while ago and found this .. if it helps
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Automate~FireFox.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Automate~FireFox.txt)

Thanks, but that is dealing with Web-scraping. I'm looking more at automating a Web Application. When we looked at WATIN in 2007, eventually a programmer wrote scripts in Ruby to completely automate a TOA Web Application from FF.  But, again thanks.