This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yahoo.media.mediaqa.selenium2test; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import org.openqa.selenium.android.AndroidDriver; | |
import org.openqa.selenium.firefox.*; | |
import org.openqa.selenium.firefox.internal.ProfilesIni; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java | |
=================================================================== | |
--- java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java (revision 16421) | |
+++ java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java (working copy) | |
@@ -101,10 +101,13 @@ | |
if (raw instanceof FirefoxProfile) { | |
profile = (FirefoxProfile) raw; | |
} else if (raw instanceof String) { | |
- try { | |
- profile = FirefoxProfile.fromJson((String) raw); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: java/client/src/org/openqa/selenium/firefox/internal/ProfilesIni.java | |
=================================================================== | |
--- java/client/src/org/openqa/selenium/firefox/internal/ProfilesIni.java (revision 16421) | |
+++ java/client/src/org/openqa/selenium/firefox/internal/ProfilesIni.java (working copy) | |
@@ -134,7 +134,11 @@ | |
case WINDOWS: | |
case VISTA: | |
case XP: | |
- appData = new File(MessageFormat.format("{0}\\Mozilla\\Firefox", System.getenv("APPDATA"))); | |
+ if (System.getenv("APPDATA") == null ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With this in my code: | |
capability.setCapability(FirefoxDriver.PROFILE, "Firefox8"); | |
I see this occur on the VM: | |
09:07:06.564 INFO - Executing: [new session: {platform=WINDOWS, firefox_profile=Firefox8, firefox_binary=C:\Program Files\Mozilla Fire..., browserName=firefox, version=4.0}] at URL: /session) | |
but even though firefox_profile=Firefox8, the Firefox8 profile is not used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: This assumes all your various firefox profiles are within your %USERPROFILE% directory | |
for /f "delims==" %%a in (' dir "%USERPROFILE%\places.sqlite" /s/b ') do echo delete from moz_places where hidden=1 and url like 'http%%';|"sqlite3.exe" "%%a" | |
for /f "delims==" %%a in (' dir "%USERPROFILE%\*.sqlite" /s/b ') do echo vacuum;|"sqlite3.exe" "%%a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"capabilities": | |
[ | |
{ | |
"browserName": "android", | |
"platform": "ANDROID", | |
"seleniumProtocol": "WebDriver", | |
"maxInstances": 1, | |
"port": 8081 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"capabilities": | |
[ | |
{ | |
"browserName": "android", | |
"platform": "ANDROID", | |
"seleniumProtocol": "WebDriver", | |
"maxInstances": 1, | |
"port": 80 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "main" org.openqa.selenium.WebDriverException: | |
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.6', java.version: '1.6.0_26' | |
Driver info: driver.version: RemoteWebDriver | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) | |
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:131) | |
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105) | |
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Perhaps this: | |
[sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), | |
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39), | |
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27), | |
java.lang.reflect.Constructor.newInstance(Constructor.java:513), | |
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:147), | |
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:113), | |
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:397), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"capabilities": | |
[ | |
{ | |
"browserName": "firefox", | |
"platform": "WINDOWS", | |
"version": "3.6", | |
"firefox_binary": "C:\\Program Files\\Mozilla Firefox\\firefox.exe", | |
"seleniumProtocol": "Selenium", | |
"maxInstances": 6 |
NewerOlder