Closed
Bug 1302617
Opened 8 years ago
Closed 7 years ago
Unable to use profile settings in marionette driver with selenium
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: kowsalya, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36
Steps to reproduce:
I previously used firefox driver for settings up the profile for excel download.
Now, i try to use the same with marionette driver but the script fails.
I need to use similar type of profile settings that i used in firefox dirver for marionette drive.
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
profile.setPreference("browser.download.folderList", 2);
String path="D:\\Selenium_Downloads\\";
profile.setPreference("browser.download.dir", path);
profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "text/plain,text/xml,application/xml,application/excel,application/x-msexcel,application/x-excel,application/vnd.ms-excel");
profile.setPreference("browser.helperApps.deleteTempFileOnExit", true);
profile.setPreference("browser.download.importedFromSqlite",true);
profile.setPreference("browser.download.manager.closeWhenDone", true);
profile.setPreference("browser.download.manager.useWindow", false);
profile.setPreference("browser.download.manager.showWhenStarting", false);
profile.setPreference("browser.download.manager.showWhenStarting", false);
profile.setPreference("browser.download.manager.focusWhenStarting", false);
profile.setPreference("browser.download.manager.showAlertOnComplete", false);
profile.setPreference("services.sync.prefs.sync.browser.download.manager.showWhenStarting", false);
profile.setPreference("pdfjs.disabled", true);
DesiredCapabilities dc=DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, profile);
driver = new FirefoxDriver(dc);
****************************************
I changed the settings like below
dc.setCapability("marionette", true);
System.setProperty("webdriver.gecko.driver", "D:\\Downloads\\geckoDriver\\geckodriver.exe");
driver = new MarionetteDriver(dc);
**************
But i get the below error
Actual results:
1473826261162 addons.manager DEBUG Application has been upgraded
1473826261190 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1473826261191 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1473826261194 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1473826261195 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1473826261195 addons.manager DEBUG Starting provider: XPIProvider
1473826261195 addons.xpi DEBUG startup
1473826261196 addons.xpi INFO SystemAddonInstallLocation directory is missing
1473826261196 addons.xpi INFO Mapping e10srollout@mozilla.org to C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1473826261197 addons.xpi INFO Mapping firefox@getpocket.com to C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1473826261197 addons.xpi INFO Mapping loop@mozilla.org to C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1473826261198 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
1473826261198 addons.xpi DEBUG checkForChanges
1473826261198 addons.xpi DEBUG Loaded add-on state from prefs: {}
1473826261199 addons.xpi DEBUG New add-on e10srollout@mozilla.org in app-system-defaults
1473826261199 addons.xpi DEBUG getModTime: Recursive scan of e10srollout@mozilla.org
1473826261199 addons.xpi DEBUG New add-on firefox@getpocket.com in app-system-defaults
1473826261199 addons.xpi DEBUG getModTime: Recursive scan of firefox@getpocket.com
1473826261200 addons.xpi DEBUG New add-on loop@mozilla.org in app-system-defaults
1473826261200 addons.xpi DEBUG getModTime: Recursive scan of loop@mozilla.org
1473826261200 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1473826261200 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1473826261201 addons.xpi DEBUG getInstallState changed: true, state: {"app-system-defaults":{"e10srollout@mozilla.org":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\e10srollout@mozilla.org.xpi","st":1472697802984},"firefox@getpocket.com":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi","st":1472697802982},"loop@mozilla.org":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\loop@mozilla.org.xpi","st":1472697802976}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","st":1472697802986}}}
1473826261269 addons.xpi-utils DEBUG Opening XPI database C:\Users\kowsalya\AppData\Local\Temp\rust_mozprofile.joiEJojFABuN\extensions.json
1473826261273 addons.xpi-utils DEBUG New add-on e10srollout@mozilla.org installed in app-system-defaults
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1473826261285 DeferredSave.extensions.json DEBUG Save changes
1473826261285 addons.xpi-utils DEBUG New add-on firefox@getpocket.com installed in app-system-defaults
1473826261291 DeferredSave.extensions.json DEBUG Starting timer
1473826261292 DeferredSave.extensions.json DEBUG Save changes
1473826261292 addons.xpi-utils DEBUG New add-on loop@mozilla.org installed in app-system-defaults
1473826261301 DeferredSave.extensions.json DEBUG Save changes
1473826261302 addons.xpi-utils DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1473826261305 DeferredSave.extensions.json DEBUG Save changes
1473826261305 addons.xpi-utils INFO Hiding the updated system add-ons.
1473826261309 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1473826261369 addons.xpi DEBUG Calling bootstrap method install on e10srollout@mozilla.org version 1.0
1473826261370 addons.xpi-utils DEBUG Make addon app-system-defaults:e10srollout@mozilla.org visible
1473826261370 DeferredSave.extensions.json DEBUG Save changes
1473826261371 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1473826261429 addons.xpi DEBUG Calling bootstrap method install on firefox@getpocket.com version 1.0.2
1473826261430 addons.xpi-utils DEBUG Make addon app-system-defaults:firefox@getpocket.com visible
1473826261431 DeferredSave.extensions.json DEBUG Save changes
1473826261433 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1473826261458 addons.xpi DEBUG Calling bootstrap method install on loop@mozilla.org version 1.3.2
1473826261458 addons.xpi-utils DEBUG Make addon app-system-defaults:loop@mozilla.org visible
1473826261459 DeferredSave.extensions.json DEBUG Save changes
1473826261459 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1473826261459 DeferredSave.extensions.json DEBUG Save changes
1473826261460 addons.xpi DEBUG Updating XPIState for {"id":"e10srollout@mozilla.org","syncGUID":"yPN6VkZ7e4If","location":"app-system-defaults","version":"1.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Multi-process staged rollout","description":"Staged rollout of Firefox multi-process feature.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\e10srollout@mozilla.org.xpi","installDate":1472697802984,"updateDate":1472697802984,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":4584,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"47.0.1","maxVersion":"47.0.1"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1473826261460 addons.xpi DEBUG getModTime: Recursive scan of e10srollout@mozilla.org
1473826261461 addons.xpi DEBUG Updating XPIState for {"id":"firefox@getpocket.com","syncGUID":"V4HuDKCmoI3I","location":"app-system-defaults","version":"1.0.2","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Pocket","description":"When you find something you want to view later, put it in Pocket.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi","installDate":1472697802982,"updateDate":1472697802982,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":894477,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"47.0.1","maxVersion":"47.0.1"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1473826261461 addons.xpi DEBUG getModTime: Recursive scan of firefox@getpocket.com
1473826261462 addons.xpi DEBUG Updating XPIState for {"id":"loop@mozilla.org","syncGUID":"sO81nUZkRVRD","location":"app-system-defaults","version":"1.3.2","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Firefox Hello","description":"Web sharing for Firefox","creator":"Mozilla","homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\loop@mozilla.org.xpi","installDate":1472697802976,"updateDate":1472697802976,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":4239168,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"46.0a1","maxVersion":"47.*"},{"id":"xpcshell@tests.mozilla.org","minVersion":"0","maxVersion":"10"}],"targetPlatforms":[],"multiprocessCompatible":false,"seen":true}
1473826261462 addons.xpi DEBUG getModTime: Recursive scan of loop@mozilla.org
1473826261463 addons.xpi DEBUG Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"ldDJpgzq5Q-u","location":"app-global","version":"47.0.1","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1472697802986,"updateDate":1472697802986,"applyBackgroundUpdates":1,"skinnable":true,"size":22012,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"47.0.1","maxVersion":"47.0.1"}],"targetPlatforms":[],"seen":true}
1473826261463 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1473826261465 DeferredSave.extensions.json DEBUG Save changes
1473826261465 addons.xpi DEBUG Updating database with changes to installed add-ons
1473826261465 addons.xpi-utils DEBUG Updating add-on states
1473826261467 addons.xpi-utils DEBUG Writing add-ons list
1473826261472 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1473826261473 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
1473826261474 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1473826261475 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.2
1473826261476 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1473826261477 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.3.2
1473826261494 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1473826261494 addons.manager DEBUG Provider finished startup: XPIProvider
1473826261494 addons.manager DEBUG Starting provider: LightweightThemeManager
1473826261494 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1473826261494 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1473826261495 addons.manager DEBUG Starting provider: GMPProvider
1473826261499 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1473826261499 addons.manager DEBUG Provider finished startup: GMPProvider
1473826261499 addons.manager DEBUG Starting provider: PluginProvider
1473826261499 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1473826261499 addons.manager DEBUG Provider finished startup: PluginProvider
1473826261500 addons.manager DEBUG Completed startup sequence
1473826261725 Marionette INFO Listening on port 51372
1473826261913 addons.manager DEBUG Starting provider: <unnamed-provider>
1473826261913 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1473826261913 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1473826261937 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1473826261937 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1473826261937 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
1473826261938 DeferredSave.extensions.json DEBUG Starting write
1473826262148 DeferredSave.extensions.json DEBUG Write succeeded
1473826262148 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
JavaScript error: chrome://marionette/content/proxy.js, line 228: TypeError: l is undefined
****************************
The above warning i got and finally failed script with the below error.
***************************
org.openqa.selenium.NoSuchElementException: Unable to locate element: //form[@id='aspnetForm']//div//a//div[@data-filter='user_manager_create,_delete,_update,_import_users_and_groups'] (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.11 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'WTPL-KOWSALYA', ip: '192.168.182.1', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_92'
Driver info: org.openqa.selenium.firefox.MarionetteDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, appBuildId=20160623154057, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, browserVersion=47.0.1, platformVersion=6.3, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=Windows_NT, device=desktop, firefox_profile=UEsDBBQACAgIAF1hLkkAAAAAAAAAA...}]
Session ID: 9aa1c9e6-22ba-4bc2-a41c-ce7e25ce8322
*** Element info: {Using=xpath, value=//form[@id='aspnetForm']//div//a//div[@data-filter='user_manager_create,_delete,_update,_import_users_and_groups']}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at Test_Package.ImportUsers.test(ImportUsers.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
***************************
Expected results:
need help to setup the profile settings with marionette driver for excel download
Updated•8 years ago
|
Component: Untriaged → Marionette
Product: Firefox → Testing
Comment 1•7 years ago
|
||
A lot of the work around proxies has been fixed recently in bug 1370959 and capabilities/profile. I am going to assume this is fixed. If it is not, please can you reopen with a URL/HTML to reproduce and trace logs for GeckoDriver.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Comment 2•7 years ago
|
||
FYI proxy.js is not about the actual proxy work I did but the message handling between the parent and content process in Marionette.
There is only one instance of `l` left in that file which is in the following line and I cannot see that this could fail anymore:
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/testing/marionette/proxy.js#309
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•