חיפוש בתמיכה

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox capability (moz:useNonSpecCompliantPointerOrigin, true) trows NPE error on my local machine.

  • 3 תגובות
  • 1 has this problem
  • 2 views
  • תגובה אחרונה מאת obuslov

more options

I'm running Selenium 3.12 via Eclipse on MAC High Sierra v.10.13.5. My application under test is Ads that play in canvas. The test is required clicking on canvas so I'm using offset x, y coordinate. However, due to a resent changes to gecko driver the pointer origin is no longer computed based on the top and left position of the referenced element, but on the in-view center point. But these changes not supported yet by all clients/browser like selenium or Chrome. I found that you guys came with the temp workaround i.e. (moz:useNonSpecCompliantPointerOrigin, true) till these changes are supported across all Clients/Browsers. I'm trying to setup this capability on my local test environment and getting NPE error.

Here is my script and error capture:

package com.java.testcases; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; import org.testng.annotations.Test; import com.utility.generic.CoordinateUtils;

public class Test1 extends CoordinateUtils {

@Test public void tc_AG_Cont_clickOnLadyBug(){ System.setProperty("webdriver.gecko.driver", "/Users/obuslovich/workspace/WebDrivers/geckodriver");

DesiredCapabilities capability = new DesiredCapabilities(); capability.setCapability("moz:useNonSpecCompliantPointerOrigin", true); capability.setCapability(CapabilityType.ELEMENT_SCROLL_BEHAVIOR, 1);

WebDriver driver = new FirefoxDriver(); String appUrl = "https://html5.tremorvideodsp.com/v7.0.17/index.html?#/desktop/default/jwplayer/basic?playerOptions%5Bautostart%5D=true&playerOptions%5Baspectratio%5D=16%3A9&playerOptions%5Badvertising%5D%5Bclient%5D=vast&playerOptions%5Badvertising%5D%5Badmessage%5D=Ad%20%E2%80%94%20xxs%20left&playerOptions%5Badvertising%5D%5Bautoplayadsmuted%5D=true&playerOptions%5Badvertising%5D%5Btag%5D=https%3A%2F%2Fs.tremorvideodsp.com%2Fm%2F2017%2F09%2FSkZvFXP9Z%2Fvast3.xml&playerOptions%5Bfile%5D=https%3A%2F%2Fwww.apple.com%2Fmedia%2Fus%2Fwatch%2F2015%2Fa718f271_b19c_47d8_928d_d108fc5d702a%2Ftour%2Fdesign%2Fwatch-design-cc-us-20140909_1280x720h.mp4&playerOptions%5Bid%5D=tesgreenayted3&adTagUri=https%3A%2F%2Fpterodactylus.tremorvideodsp.com%2Fws%2Frml%2Freplacer%3FvastUri%3Dhttps%253A%252F%252Fs.tremorvideodsp.com%252Fm%252F2018%252F08%252FEKJF7GwmH%252Fvast3.xml%26addTVEvents%3Dtrue%26sessionId%3Df87ca66d668ab0761d99f811b0dfddd84c2de635_tc_AFD3712_TimerIncreasesWhenLongformVideoBegins_1533359435209";

//launch the firefox browser and open the application url
driver.get(appUrl);
   	    
//maximize the browser window
driver.manage().window().maximize();
   	 

waitFor(5); CoordinateUtils.clickAtBottomLeftIcon(driver, getCanvas());

// close the web browser

driver.close(); 
          • ERROR*****

1533857255741 geckodriver INFO geckodriver 0.21.0 1533857255747 geckodriver INFO Listening on 127.0.0.1:39396 1533857256059 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/gq/cphkhfzx3m1bjtpwdrg6782syxkt2_/T/rust_mozprofile.6WfIUsArNxuP" 1533857256718 addons.xpi-utils WARN addMetadata: Add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} is invalid: Error: Install manifest specifies unknown type: theme (resource://gre/modules/addons/XPIInstall.jsm:721:11) JS Stack trace: loadManifestFromRDF@XPIInstall.jsm:721:11 loadFromRDF@XPIInstall.jsm:893:23 awaitPromise@XPIProvider.jsm:240:3 syncLoadManifestFromFile@XPIInstall.jsm:981:10 addMetadata@XPIDatabase.jsm:2490:21 processFileChanges@XPIDatabase.jsm:2833:23 checkForChanges@XPIProvider.jsm:2139:34 startup@XPIProvider.jsm:1591:25 callProvider@AddonManager.jsm:207:12 _startProvider@AddonManager.jsm:655:5 startup@AddonManager.jsm:819:9 startup@AddonManager.jsm:2885:5 observe@addonManager.js:66:9 1533857256718 addons.xpi-utils WARN Could not uninstall invalid item from locked install location 2018-08-09 16:27:37.491 plugin-container[84150:22368524] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x803f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2018-08-09 16:27:37.757 plugin-container[84151:22368551] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7a03, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. JavaScript error: resource://gre/modules/addons/XPIProvider.jsm, line 2189: TypeError: addon is null 1533857257917 Marionette INFO Listening on port 63766 1533857258016 Marionette WARN TLS certificate errors will be ignored for this session Aug 09, 2018 4:27:38 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 2018-08-09 16:27:38.536 plugin-container[84152:22368677] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x842f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 09 Aug 2018 16:27:45 INFO logger - Clicking on Mybug Aug 09, 2018 4:27:45 PM org.openqa.selenium.interactions.Actions moveToElement INFO: When using the W3C Action commands, offsets are from the center of element FAILED: tc_AG_Cont_clickOnLadyBug java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882) at org.openqa.selenium.interactions.PointerInput$Origin.fromElement(PointerInput.java:221) at org.openqa.selenium.interactions.Actions.moveInTicks(Actions.java:418) at org.openqa.selenium.interactions.Actions.moveToElement(Actions.java:412) at com.utility.generic.CoordinateUtils.clickAtBottomLeftIcon(CoordinateUtils.java:72) at com.java.testcases.Test1.tc_AG_Cont_clickOnLadyBug(Test1.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198) at org.testng.TestNG.runSuitesLocally(TestNG.java:1123) at org.testng.TestNG.run(TestNG.java:1031) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)


===================================
   Default test
   Tests run: 1, Failures: 1, Skips: 0
===================================

כל התגובות (3)

more options

The Release Regression Testing on Firefox is blocked due to this issue so any help is welcome and very much appreciated!!

more options

Hi, No idea what so ever...


Firefox Support is done by Volunteers and there are no Developers here. If seeking help try Github.com or Stackoverflow.com

more options

Got it - Thanks @Pkshadow!