Automate Firefox Through WATIN -STA mode

Started by stanl, January 12, 2015, 10:22:24 AM

Previous topic - Next topic

stanl

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.

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

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 

td

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'...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

hdsouza

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

stanl

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

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.