viewpoint-particle

Author Topic: Automate Firefox Through WATIN -STA mode  (Read 4985 times)

stanl

  • Pundit
  • *****
  • Posts: 1655
Automate Firefox Through WATIN -STA mode
« 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.

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: Automate Firefox Through WATIN -STA mode
« Reply #1 on: January 12, 2015, 10:42:27 am »
Should not be an issue.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1655
Re: Automate Firefox Through WATIN -STA mode
« Reply #2 on: January 13, 2015, 09:50:33 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.
 
Code: [Select]

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

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: Automate Firefox Through WATIN -STA mode
« Reply #3 on: January 13, 2015, 10:08:12 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

  • Full Member
  • ***
  • Posts: 162
Re: Automate Firefox Through WATIN -STA mode
« Reply #4 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

stanl

  • Pundit
  • *****
  • Posts: 1655
Re: Automate Firefox Through WATIN -STA mode
« Reply #5 on: January 13, 2015, 12:55:45 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.