0

I am trying to run my selenium tests on aerokube moon

I can see moon ui at http://moon.aerokube.local/ with default configuration.

taking reference from java example project on their github I have setup moon capabilities as

Dictionary<dynamic, dynamic> moonoption = new Dictionary<dynamic, dynamic>();
            moonoption.Add("enableVideo", true);
            moonoption.Add("enableVNC", true);
            moonoption.Add("videoName", testName + ".mp4");
ChromeOptions copt = new ChromeOptions();
copt.AddAdditionalCapability("moon:options", moonoption);

but when I run the tests I get the error

enter image description here

How to add the moon capabilities for moon in C#

also no tag for moon is available so add so adding selenoid edit: I am using Selenium 3.

smiles
  • 221
  • 1
  • 4
  • 19

1 Answers1

0

You should add moon:options on the top level of capabilities object. Your code is adding the same key under goog:chromeOptions which is wrong.

vania-pooh
  • 2,933
  • 4
  • 24
  • 42
  • can you please give the example how am I supposed to do this. – smiles Aug 19 '22 at 13:28
  • adding the key under chrome as u put works in selenium 4 . if I upgrade to selenium 4 and use chromeOptions.AddAdditionalOption("moon:options" moon) works – smiles Aug 22 '22 at 18:44
  • If I remember correctly ChromeOptions in Selenium 3 should be added under DesiredCapabilities. – vania-pooh Aug 23 '22 at 09:47
  • No , ChromeOptions are converted to capabilities by calling chromeOption.ToCapability() also DesiredCapabilities class is deprecated in Selenium3. In Selenium4 moon is being added under chromeoptions too – smiles Aug 23 '22 at 11:17