Closed
Bug 1217988
Opened 10 years ago
Closed 10 years ago
platformName capability reports compile system's OS name instead of effective, local system name
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox45 fixed)
RESOLVED
FIXED
mozilla45
| Tracking | Status | |
|---|---|---|
| firefox45 | --- | fixed |
People
(Reporter: joshin4colours, Assigned: ato)
References
(Blocks 1 open bug)
Details
(Keywords: pi-marionette-server)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20151019030227
Steps to reproduce:
Using Selenium WebDriver 2.48.2 with Wires 0.4.2 on a Win 7 machine and Java bindings (Oracle JDK 1.8.0_11) I ran the following code:
------------------------------------
public class MarionetteTest {
WebDriver _driver;
private final String URL = "https://the-internet.herokuapp.com";
@BeforeClass(alwaysRun = true)
public void setUpBeforeClass() {
_driver = new MarionetteDriver();
}
/**
* Setup method for each test method.
* Creates two random accounts (not added) and goes to GLAccounts Page.
*/
@BeforeMethod(alwaysRun = true)
public void setUp() {
_driver.navigate().to(this.URL);
}
/**
* Teardown method for each test method. Attempts to log out of Collaborate.
*/
@AfterMethod(alwaysRun = true)
public void tearDown() {
_driver.manage().deleteAllCookies();
_driver.navigate().refresh();
}
/**
* Base teardown method for TOTG Tax test class.
*/
@AfterClass(alwaysRun = true)
public void tearDownAfterClassCollaborate() {
_driver.quit();
}
@Test
public void openTheInternet() {
Assert.assertTrue(_driver.findElement(By.xpath(".//a[@href='https://github.com/tourdedave/the-internet']")).isDisplayed());
}
}
Actual results:
The tests failed at the @BeforeClass step of staring a new MarionetteDriver instance with the following stack trace:
FAILED CONFIGURATION: @BeforeClass setUpBeforeClass
org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'GRANT7', ip: '192.168.214.56', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_11'
Driver info: driver.version: MarionetteDriver
at org.openqa.selenium.firefox.internal.Executable.<init>(Executable.java:75)
at org.openqa.selenium.firefox.GeckoDriverService$Builder.createArgs(GeckoDriverService.java:93)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:299)
at org.openqa.selenium.firefox.MarionetteDriver.setupService(MarionetteDriver.java:99)
at org.openqa.selenium.firefox.MarionetteDriver.<init>(MarionetteDriver.java:71)
at org.openqa.selenium.firefox.MarionetteDriver.<init>(MarionetteDriver.java:45)
at com.caseware.commons.client.smauto.test.marionette.MarionetteTest.setUpBeforeClass(MarionetteTest.java:28)
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:483)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
at org.testng.TestRunner.privateRun(TestRunner.java:773)
at org.testng.TestRunner.run(TestRunner.java:623)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Expected results:
The code should've executed as written with the MarionetteDriver creating a new instance and preferably successfully completing the given @Test methods.
Furthermore, there appears to be a discrepancy in these lines:
org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'GRANT7', ip: '192.168.214.56', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_11'
| Assignee | ||
Comment 1•10 years ago
|
||
As far as I can tell WebDriver leaves the platformName capabilities to be implementation defined in https://w3c.github.io/webdriver/webdriver-spec.html#dfn-processing-capabilities. This means Marionette is conformant.
We get the OS value from Services.jsm's appinfo property, which is documented in nsIXULRuntime.idl ( https://dxr.mozilla.org/mozilla-central/source/xpcom/system/nsIXULRuntime.idl?from=xpcom%2Fsystem%2FnsIXULRuntime.idl#41) to be:
* A string tag identifying the current operating system. This is taken
* from the OS_TARGET configure variable. It will always be available.
I imagine OS_TARGET is set by the machine that compiled your binary, which would be a Windows 7 machine, rather than your local system's actual computed OS.
It may be that what we want to look at is the "appVersion" or "oscpu" system properties described in https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/NsIPropertyBag.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Updated•10 years ago
|
Blocks: webdriver
Keywords: ateam-marionette-server
Summary: Marionette Incorrectly Identifies Win7 As Vista → platformName capability reports compile system's OS name instead of effective, local system name
| Assignee | ||
Updated•10 years ago
|
OS: Unspecified → All
Hardware: Unspecified → All
| Assignee | ||
Comment 2•10 years ago
|
||
Bug 1217988: Use current system OS for platformName capability
Services.appinfo is populated by the target compile system's OS name,
taken from the OS_TARGET configure variable.
By using Services.sysinfo instead, we are returning the effective current
local system's operating system, which is similar to what is found in
Gecko's UA string.
r=dburns
| Assignee | ||
Updated•10 years ago
|
Attachment #8685464 -
Flags: review?(dburns)
| Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8685464 [details]
MozReview Request: Bug 1217988: Use current system OS for platformName capability
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24793/diff/1-2/
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment 4•10 years ago
|
||
Comment on attachment 8685464 [details]
MozReview Request: Bug 1217988: Use current system OS for platformName capability
https://reviewboard.mozilla.org/r/24793/#review22355
Attachment #8685464 -
Flags: review?(dburns) → review+
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
| Reporter | ||
Comment 8•10 years ago
|
||
After discussion with :ato, I used the Firefox build from the installer from Treeherder here:
http://archive.mozilla.org/pub/firefox/try-builds/bind-autoland@mozilla.com-e765987f3004ae3c5691fee31bbc15562bac8baf/try-win64/
The WebDriverException above "org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA" is no longer being thrown. All OS related values appear to be correct for the given platform.
However I'm still getting a UnreachableBrowserException despite Firefox being invoked.
| Assignee | ||
Comment 10•10 years ago
|
||
| Assignee | ||
Comment 11•10 years ago
|
||
| Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8685464 [details]
MozReview Request: Bug 1217988: Use current system OS for platformName capability
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24793/diff/1-2/
| Assignee | ||
Comment 13•10 years ago
|
||
| Assignee | ||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
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
•