Internet Explorer not launching , with selenium driver 3.11.0 and ie driver 3.11.1 - selenium

*I am not able to launch IE with the configuration , IE Driver 3.11.1 and selenium 3.11.0.
This same code is working with Selenium WebDriver 3.6.0 , but fails for 3.7.0 and above.
Code:-
InternetExplorerOptions options=new InternetExplorerOptions();
//options.destructivelyEnsureCleanSession();
options.ignoreZoomSettings();
options.introduceFlakinessByIgnoringSecurityDomains();
System.setProperty("webdriver.ie.driver",ReadProperty.dictProjectVar.get("Driver")+"IEDriverServer.exe");
if (Launcher.dicConfig.get("DistributedExecution").equalsIgnoreCase("yes")){
driver = new RemoteWebDriver(new URL("http://"+ dicMachineIPs.get("Hub")+":4444/wd/hub"), DesiredCapabilities.internetExplorer());
}
else{
driver = new InternetExplorerDriver(options);
}
Error thrown is :-
org.openqa.selenium.InvalidArgumentException: All firstMatch elements failed validation
Invalid capabilities in firstMatch element 0: unknown capability named ensureCleanSession
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: '5CG3455ZG9', ip: '10.4.5.242', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_161'
Driver info: driver.version: InternetExplorerDriver
remote stacktrace:
Path of the driver is correct.
Why am i not able to launch IE?

Related

Appium, error for create new session signature

cannot create new session for android 11.0 oppo because of the signature problem, i already try to enable "Disable permission Monitoring". its running on another device but not for this os
public class testjalan {
public static AndroidDriver<WebElement> driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
//capabilities.setCapability("w3c", false);
capabilities.setCapability("appium:chromeOptions", ImmutableMap.of("w3c", false));
//capabilities.setCapability("chromedriverExecutable",
driver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://google.com");
driver.findElement(By.name("q")).sendKeys("Hello Appium !!!");
Thread.sleep(5000);
driver.quit();
error message that i getting
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'C:\Users\Lenovo IP320\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk'. Original error: The JAVA_HOME location 'C:\Program Files\Java\jre1.8.0_311' must exist
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LAPTOP-3S5PCPN8', ip: '192.168.174.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'C:\Users\Lenovo IP320\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk'. Original error: The JAVA_HOME location 'C:\Program Files\Java\jre1.8.0_311' must exist
at getResponseForW3CError (C:\Users\Lenovo IP320\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\Lenovo IP320\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LAPTOP-3S5PCPN8', ip: '192.168.174.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:216)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:225)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:89)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:99)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:97)
at test.testjalan.main(testjalan.java:40)
what i try to fixing for running in os 11.0 for oppo phone
Please go through your error ,there its clearly telling what's causes your issue
Can you please set your java_path as displayed
Original error: The JAVA_HOME location 'C:\Program
Files\Java\jre1.8.0_311' must exist

Unable to launch chrome with selenium standalone

I am trying to launch chrome using selenium standalone by using below command
java -Dwebdriver.chrome.driver=chromedriver-new.exe -jar selenium-server.jar standalone --host 127.0.0.1 --port 4444
However when I am triggering my webdriverio test for chrome, it momentarily opens chrome and the it crashes with below error
{"traceId": "faca75a3db657eed4b96bdac93977746","eventTime": 1637343152240678600,"eventName": "exception","attributes": {"driver.url": "http:\u002f\u002flocalhost:57786","exception.message": "Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created\nfrom tab crashed\n (Session info: chrome=96.0.4664.45)\nBuild info: version: '4.0.0', revision: '3a21814679'\nSystem info: host: '', ip: '192.168.0.11', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_311'\nDriver info: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created\nfrom tab crashed\n (Session info: chrome=96.0.4664.45)\nBuild info: version: '4.0.0', revision: '3a21814679'\nSystem info: host: '', ip: '192.168.0.11', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_311'\nDriver info: driver.version: unknown\r\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)\r\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:84)\r\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:62)\r\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:131)\r\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:65)\r\n\tat org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:143)\r\n\tat org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:315)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:513)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:440)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:648)\r\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:612)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.lang.Thread.run(Unknown Source)\r\n","exception.type": "org.openqa.selenium.SessionNotCreatedException","logger": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory","session.capabilities": "{"acceptInsecureCerts": true,"browserName": "chrome","goog:chromeOptions": {"args": [ "--disable-gpu" ] } }\n"}}
It worked by adding '--no-sandbox' in chrome options.

How to run selenium standalone server with Edge webdriver?

I'm trying to run Selenium tests against Edge, in the same way I successfully run with Chrome or Internet Explorer 11 but it fails.
What I do is starting the standalone selenium and it works fine:
java -Dwebdriver.edge.driver=C:\tmp\msedgedriver.exe -jar C:\tmp\selenium-server-standalone-3.141.59.jar -port 4445
But when I run the Selenium tests, it fails with the error below:
I've tried to add "-DbrowserName=edge" but it does not make any difference.
Is there something I've missed?
Build info: version: '3.8.1', revision: '6e95a6684b', time:
'2017-12-01T19:05:32.194Z' System info: host: 'MSEDGEWIN10', ip:
'10.0.2.15', os.name: 'Windows 10', os.arch: 'amd64', os.version:
'10.0', java.version: '1.8.0_201' Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:89)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:171)
at org.openqa.selenium.remote.server.DefaultSession.(DefaultSession.java:88)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:76)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:72)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:63)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:37)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:112)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:191)
at org.openqa.selenium.remote.server.DriverServlet.lambda$handleRequest$0(DriverServlet.java:261)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) 08:13:43.301 WARN - Exception: The best matching driver provider class
org.openqa.selenium.edge.EdgeDriver can't create a new driver instance
for Capabilities {browserName: edge}
Here's the java code I wrote to use Feature on Demand EdgeDriver. This has not been tested, so if you use it, let me know if it works:
String windir = System.getenv("windir");
boolean is64bit = false;
is64bit = (System.getenv("ProgramFiles(x86)") != null);
String edgeDriverPath = windir + "\\SysWOW64\\MicrosoftWebDriver.exe";
if (!is64bit)
{
edgeDriverPath = windir + "\\System32\\MicrosoftWebDriver.exe";
}
System.setProperty("webdriver.edge.driver", edgeDriverPath);
EdgeOptions edgeOptions = new EdgeOptions();
//edgeOptions.setPageLoadStrategy(stringPageLoadConstant);
try {
driver = new EdgeDriver(edgeOptions);
}
catch (Exception ex)
{
System.out.println ("Problem launching EdgeDriver: " + ex.toString());
}

" org.openqa.selenium.SessionNotCreatedException" for selenium grid

I am trying to run script to another vm but it give me following error message.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'BDQCC3', ip: '10.132.48.16', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: driver.version: unknown"
MY code is
public static void main(String[] args) throws MalformedURLException
{
// TODO Auto-generated method stub
WebDriver driver;
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setBrowserName("chrome");
capabilities.setPlatform(Platform.WIN10);
driver = new RemoteWebDriver(new URL("http://10.132.48.16:5566/wd/hub"), capabilities);
driver.get("http://google.com");
System.out.println(driver.getTitle());
}
Seems the command executed on grid node (10.132.48.16) to register to grid hub(10.132.48.16) is not correct. I doubt the command missed the option: -Dwebdriver.chrome.driver= to sepecify the path of chromedriver.
Register commmand example:
java -jar %~dp0\selenium-server-standalone-2.45.0.jar -role node -nodeConfig node.json -Dwebdriver.chrome.driver=%~dp0\chromedriver.exe
login to the grid node 10.132.48.16, stop the register process and check the register command is correct, also please put the command at here to help us to resovle the problem.

Unable to launch firefox with selenium grid 3.0.1 gecko driver 0.11.1 firefox 50.0.1

Trying to launch firefox with selenium grid is through exception as below:
org.openqa.selenium.sessionnotcreatedexception
Code I am using is as below:
if(useRemoteWebDriver){
URL seleniumGridURL = new URL(System.getProperty("gridURL"));
String desiredBrowserVersion = System.getProperty("desiredBrowserVersion");
String desiredPlatform = System.getProperty("desiredPlatform");
if (!desiredPlatform.isEmpty())
if ((null != desiredPlatform)) {
desiredCapabilities.setPlatform(Platform.valueOf(desiredPlatform.toUpperCase()));
}
if (null != desiredBrowserVersion && !desiredBrowserVersion.isEmpty()){
desiredCapabilities.setVersion(desiredBrowserVersion);
}
webDriver = new RemoteWebDriver(seleniumGridURL, desiredCapabilities);
}else{
webDriver = selectedDriverType.getWebDriverObject(desiredCapabilities);
}
and I am trying to run it from command line using
mvn clean install -Dremote=true -DseleniumGridURL=http://localhost:5555/wd/hub -Dbrowser=firefox -Dwebdriver.gecko.driver="E:\GeckoDriver\geckodriver.exe" -DbrowserVersion="50.0.1"
this is giving me the following exception
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, binary=C:\Program Files (x86)\Mozilla Firefox\firefox.exe, browserName=firefox, version=50.0.1, platform=ANY}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'exipc0006', ip: '172.16.12.123', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_111'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
at com.HomLuvAutomation.WebDriverThread.instantiateWebDriver(WebDriverThread.java:89)
at com.HomLuvAutomation.WebDriverThread.getDriver(WebDriverThread.java:40)
at com.HomLuvAutomation.DriverFactory.getDriver(DriverFactory.java:46)
at com.HomLuvAutomation.BasicSearchWD.exampleOfTestNgMaven(BasicSearchWD.java:22)
at com.HomLuvAutomation.BasicSearchWD.austinSearch(BasicSearchWD.java:56)