-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to selenium 3.14.0. #420
base: 2.x
Are you sure you want to change the base?
Conversation
@shankarkc Can you now check this. This is using branch 2.x as a base. |
@damencho Thanks a lot for quick turnaround time. I will check tomorrow as its night here IST. I have noticed that com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy was broken in selenium grid extra due to changes in selenium grid code base. When I used |
@@ -73,7 +71,6 @@ public String renderSummary() { | |||
} | |||
|
|||
private String getIcon(Map<String, Object> capabilities) { | |||
return BrowserNameUtils.getConsoleIconPath(new DesiredCapabilities(capabilities), | |||
proxy.getRegistry()); | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might not be right. Depending on the browser it should return icon for the browser.
public static String getConsoleIconPath(DesiredCapabilities cap, GridRegistry registry) {
String name = consoleIconName(cap, registry);
String path = "org/openqa/grid/images/";
InputStream in =
Thread.currentThread().getContextClassLoader()
.getResourceAsStream(path + name + ".png");
if (in == null) {
return null;
}
return "/grid/resources/" + path + name + ".png";
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe you are right. But this is just how we run, not sure where this is used ... It was the quickest way to get rid of BrowserNameUtils.
I can update the code if you want.
In my changes, there was some dead code that I removed, rather than updating it, like a servlet in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its used in grid console page...I am not sure though. I looked at old code and copy pasting it here so that it helps you to fix it quickly
private static String consoleIconName(DesiredCapabilities cap, GridRegistry registry) {
String browserString = cap.getBrowserName();
if (browserString == null || "".equals(browserString)) {
return "missingBrowserName";
}
String ret = browserString;
// Map browser environments to icon names.
if (browserString.contains("iexplore") || browserString.startsWith("*iehta")) {
ret = BrowserType.IE;
} else if (browserString.contains("firefox") || browserString.startsWith("*chrome")) {
if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("beta") ||
cap.getBrowserName().toLowerCase().contains("beta")) {
ret = "firefoxbeta";
} else if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("aurora") ||
cap.getBrowserName().toLowerCase().contains("aurora")) {
ret = "aurora";
} else if (cap.getVersion() != null && cap.getVersion().toLowerCase().equals("nightly") ||
cap.getBrowserName().toLowerCase().contains("nightly")) {
ret = "nightly";
} else {
ret = BrowserType.FIREFOX;
}
} else if (browserString.startsWith("*safari")) {
ret = BrowserType.SAFARI;
} else if (browserString.startsWith("*googlechrome")) {
ret = BrowserType.CHROME;
} else if (browserString.toLowerCase().contains("edge")) {
ret = BrowserType.EDGE;
}
return ret.replace(" ", "_");
}
/**
* get the icon representing the browser for the grid. If the icon cannot be located, returns
* null.
*
* @param cap - Capability
* @param registry - Registry
* @return String with path to icon image file. Can be null if no icon
* file if available.
*/
public static String getConsoleIconPath(DesiredCapabilities cap, GridRegistry registry) {
String name = consoleIconName(cap, registry);
String path = "org/openqa/grid/images/";
InputStream in =
Thread.currentThread().getContextClassLoader()
.getResourceAsStream(path + name + ".png");
if (in == null) {
return null;
}
return "/grid/resources/" + path + name + ".png";
}
Yep, SetupTeardownProxy was broken in master when using latest selenium. It is fixed in 2.x branch, the one we are using. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls take a look at getIcon method below. I think it needs little modification
@damencho please let me know the git repo/branch that I can use. I will test it and let you know the results tomorrow. |
It seems to me it is not used, at least I don't see a broken icon or anything on the UI. |
*@damencho *I found an issue. I havnt gone thought the code that is
causing it.
{
"capabilities": [
{
"seleniumProtocol": "WebDriver",
"browserName": "firefox",
"maxInstances": 3,
"version": "62",
"platform": "WIN10"
},
{
"seleniumProtocol": "WebDriver",
"browserName": "chrome",
"maxInstances": 3,
"version": "68",
"platform": "WIN10"
}
],
"loadedFromFile": "node_5555.json",
"proxy": "com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy",
"servlets": [],
"maxSession": "3",
"port": "5555",
"register": true,
"unregisterIfStillDownAfter": "10000",
"hubPort": "4444",
"hubHost": "127.0.0.1",
"registerCycle": "5000",
"nodeStatusCheckTimeout": "10000",
"browserTimeout": "null",
"timeout": "null",
"custom": {
"grid_extras_port": "3000"
},
"downPollingLimit": "0"
}
Here is node_5555.json that got generated. It has null as timeout value.
because of it grid fails to launch
Exception in thread "main" com.beust.jcommander.ParameterException:
"-timeout": couldn't convert "null" to an integer
at
com.beust.jcommander.converters.IntegerConverter.convert(IntegerConverter.java:38)
at
com.beust.jcommander.converters.IntegerConverter.convert(IntegerConverter.java:28)
at
com.beust.jcommander.JCommander.convertValue(JCommander.java:1472)
at
com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:238)
at
com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:218)
at
com.beust.jcommander.JCommander.initializeDefaultValue(JCommander.java:665)
at
com.beust.jcommander.JCommander.initializeDefaultValues(JCommander.java:356)
at com.beust.jcommander.JCommander.parse(JCommander.java:339)
at com.beust.jcommander.JCommander.parse(JCommander.java:319)
at
org.openqa.grid.internal.cli.GridNodeCliOptions$Parser.parse(GridNodeCliOptions.java:48)
at
org.openqa.grid.selenium.GridLauncherV3$3.<init>(GridLauncherV3.java:296)
at
org.openqa.grid.selenium.GridLauncherV3.lambda$buildLaunchers$2(GridLauncherV3.java:295)
at
org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:163)
at
org.openqa.grid.selenium.GridLauncherV3.launch(GridLauncherV3.java:97)
at
org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:81)
…On Thu, Aug 16, 2018 at 11:33 PM, Дамян Минков ***@***.***> wrote:
It seems to me it is not used, at least I don't see a broken icon or
anything on the UI.
This is the repo and the branch: https://github.com/damencho/
Selenium-Grid-Extras/tree/update-selenium-2.x
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEb7V--8PThiPVOc_uV_r8LTiHpTkhHPks5uRbP6gaJpZM4WANXU>
.
|
I see, while fixing the tests I saw that, but didn't think it will be an issue. The Gson serializer is supposed to be removing those by default ... I will check these days or next week, when I have time. |
@damencho same issue is with Once its fixed I do see grid node getting registred to hub Great work. 👏 🙇 ✨✨ |
@damencho I will run some UI tests on this grid and update the thread if all is good. |
@damencho selenium grid extra hub URL is not working ie on hub node if i run http://10.xxx.xxx.1:3000 it should open video page. But it times out. i see this error
Also in node i dont see video getting recorded. Most likely bcz of above call stack. |
Fixes the resulting config file to not have values like: "browserTimeout": "null" and "timeout": "null"
I fixed the browserTimeout and timeout. The missing xuggle, I don't think it has anything to do with my PR, I think if you checkout just the 2.x branch you will have the same error or it is something local. |
Nope, I don't see anything related to that, so branch 2.x should be running fine. |
Let me try running it on onther machine. Will update you Monday ist eod.
…On Fri, Aug 17, 2018, 11:35 AM Дамян Минков ***@***.***> wrote:
Nope, I don't see anything related to that, so branch 2.x should be
running fine.
And also in the target jar-with-dependencies all the native libraries are
there, are you sure it is not something local on your deployment?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEb7V1zVp1ywKHspihOEA60dlzsEKGsvks5uRl0tgaJpZM4WANXU>
.
|
Hello guys! Is this project completely abandoned? |
I have the same question :( |
Contains some changes that are covered in #402
Tests are passing.