Setting additional capability "moz:useNonSpecCompliantPointerOrigin"

47 views
Skip to first unread message

Nicolas

unread,
Aug 21, 2018, 9:50:10 AM8/21/18
to Selenium Users
Hi all

I need to set the firefox capability "moz:useNonSpecCompliantPointerOrigin" that has been introduced recently.
Has anybody succeeded to set it with the c# language bindings?

Here is the snipped that shows how I tried it:

myFirefoxOptions.AddAdditionalCapability("moz:useNonSpecCompliantPointerOrigin",  true);
new FirefoxDriver(myFirefoxOptions)

I get a WebDriverException that says "Invalid moz:firefoxOptions field moz:useNonSpecCompliantPointerOrigin".

Am I doing it wrong, or shall i file an issue for that.

Best regards,
Nicolas

Nicolas

unread,
Aug 21, 2018, 9:51:06 AM8/21/18
to Selenium Users
Forgot go mention that I am using latest Firefox, GeckoDriver and Selenium Versions...

Jim Evans

unread,
Aug 21, 2018, 11:36:56 AM8/21/18
to Selenium Users
Try the AddAdditionalCapability overload that takes three arguments instead of two, and pass `true` for the third argument. For example:

options.AddAdditionalCapability("moz:useNonSpecCompliantPointerOrigin", true, true);

As an aside, it’s interesting that you feel you require this capability; the .NET bindings already do the math to calculate actions offsets from the top-left of the element instead of the visible center (which is what this capability does).

Nicolas

unread,
Aug 22, 2018, 2:35:29 AM8/22/18
to Selenium Users
Hi Jim

Thx for the input. I have solved the issue. I had a problem that seemed related to this capabilitiy. It showed it was not :)

regards,
Nicolas
Reply all
Reply to author
Forward
0 new messages