Selenium Webdriver with C#

Hello again!

So, whenever I try to run an application via Octopus-Deploy I get the following error:

1505419552453 geckodriver INFO geckodriver 0.18.0
September 14th 2017 16:05:53Error
1505419552461 geckodriver INFO Listening on 127.0.0.1:54779
September 14th 2017 16:05:54Error
1505419553521 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
September 14th 2017 16:05:55Info
1505419554653 addons.xpi WARN Error parsing extensions state: [Exception… “Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [amIAddonManagerStartup.readStartupData]” nsresult: “0x80520012 (NS_ERROR_FILE_NOT_FOUND)” location: “JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadExtensionState :: line 1596” data: no] Stack trace: loadExtensionState()@resource://gre/modules/addons/XPIProvider.jsm:1596 < getInstallState()@resource://gre/modules/addons/XPIProvider.jsm:1631 < checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3152 < startup()@resource://gre/modules/addons/XPIProvider.jsm:2246 < callProvider()@resource://gre/modules/AddonManager.jsm:271 < _startProvider()@resource://gre/modules/AddonManager.jsm:741 < startup()@resource://gre/modules/AddonManager.jsm:908 < startup()@resource://gre/modules/AddonManager.jsm:3122 < observe()@jar:file:///C:/Program%20Files%20(x86)/Mozilla%20Firefox/omni.ja!/components/addonManager.js:65
September 14th 2017 16:05:56Info
1505419555159 Marionette INFO Enabled via --marionette
September 14th 2017 16:06:00Error
###!!! [Parent][MessageChannel] Error: (msgtype=0x28008C,name=PBrowser::Msg_UpdateNativeWindowHandle) Channel error: cannot send/recv
September 14th 2017 16:06:00Error
###!!! [Parent][MessageChannel] Error: (msgtype=0x280080,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
September 14th 2017 16:06:00Error
JavaScript error: resource:///modules/ContentCrashHandlers.jsm, line 135: TypeError: WeakMap key must be an object, got undefined
September 14th 2017 16:06:00Error
###!!! [Parent][MessageChannel] Error: (msgtype=0x28008C,name=PBrowser::Msg_UpdateNativeWindowHandle) Channel error: cannot send/recv
September 14th 2017 16:06:00Error
###!!! [Parent][MessageChannel] Error: (msgtype=0x280080,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
September 14th 2017 16:06:43Fatal
The remote script failed with exit code -1
September 14th 2017 16:06:43Fatal
Run Package on Master-Controller

I start the exe file by using the powershell option in the script step with the following code:

cd “C:\Repository\QA - Automation\UnitTestProject\bin\Debug”
.\UnitTestProject.exe

Any ideas on how to run my test application on the machine I push my packages to? I’m using Selenium Webdriver not Unit Testing.

Thanks,

Zach

So, for an update on this issue, whenever I switch the Webdriver to use Chrome instead of Firefox everything works fine. I still need to use Firefox and any other web browser.

Here’s a code snippet i use to instantiate the webdriver in C#:

IWebDriver wd = new ChromeDriver();

//instead of
//IWebDriver wd = new FirefoxDriver();

Hi Zach,

Thanks for getting in touch! And thanks for the additional information here. However, I may need to get some further information to better understand what could be going on here. Where are you seeing the logs that you linked here? Would it be possible to attach the whole log as a text file?
Are the errors that you’re receiving in Octopus, during your deployment? A full deployment log would help a lot here. https://octopus.com/docs/how-to/get-the-raw-output-from-a-task

Looking forward to hearing from you and getting to the bottom of this.

Best regards,
Daniel