I have installed:
selenium grid 2.53.0 hub +node for IE;
Jenkins;
IE 11.
When I try to run a build for IE via batch command with variable BROWSER=ie I'm getting next error:
Error forwarding the new session cannot find : Capabilities [{browserName=internetexplorer, version=null}] (org.openqa.grid.common.exception.GridException) (Selenium::WebDriver::Error::UnknownError)
What can be wrong? Because when I run my tests not via grid everything is ok.
If I connect node for chrome and specify chrome everything is ok too.
Try this:
DesiredCapabilities cap = null;
WebDriver driver = null;
cap = DesiredCapabilities.internetExplorer();
cap.setBrowserName("internet explorer");
cap.setPlatform(Platform.WIN8); //specify the platform
driver = new RemoteWebDriver(new URL(nodeURL), cap);
I resolved this.
I specified incorrectly BROWSER value in Jenkins. Must be BROWSER="internet explorer"
Related
I'm using webdriverIO for some automation testing and have recently migrated from 'selenium-standalone' service to default wdio devtools protocol.
wdio v.7.16.12
firefox v.95.0.2
From that point I can't start testing with firefox browser:
INFO #wdio/cli:launcher: Run onPrepare hook
INFO #wdio/cli:launcher: Run onWorkerStart hook
INFO #wdio/local-runner: Start worker 0-0 with arg: run,wdio.conf.js
INFO #wdio/local-runner: Run worker command: run
...
INFO devtools:puppeteer: Initiate new session using the DevTools protocol
ERROR #wdio/runner: Error: Couldn't find executable for browser
...
INFO #wdio/cli:launcher: Run onComplete hook
I've tried different combinations of options with 'wdio:devtoolsOptions' and 'moz:firefoxOptions'.
Plus checked whether could help dumpio: true, and 'moz:debuggerAddress': true options.
Also I've tried substitution browserName with product and adding binary and executablePath to capabilities.
When passing binary: 'path.to.firefox' to 'moz:firefoxOptions' options, the error message changes to:
ERROR #wdio/runner: Error: Only Nightly release channel is supported in Devtools/Puppeteer for Firefox. Refer to the following issue:
...
Any ideas how it could be fixed in webdriverIO (without installing separately puppeteer or puppeteer-firefox)?
Thanks!
Seems that I took desired for real.
wdio + devtools:puppeteer still work with Firefox Nightly only – https://github.com/webdriverio/webdriverio/discussions/7916
we are using katalon studio version 7.8.
We have initiated the script execution and proceeded with other works by accessing File explorer for example.
Script execution is getting stopped and throwing an error “Timed out receiving message from renderer: 10.000”
If focus is moved again to the browser, script execution continues.
Can you share the solution why background execution is getting stopped.
Thanks!
Use headless mode for Chrome.
You can set the headless mode programmatically with
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverPath())
ChromeOptions opt = new ChromeOptions()
opt.addArgument('headless')
ChromeDriver driver = new ChromeDriver(opt)
DriverFactory.changeWebDriver(driver)
WebUI.navigateToUrl('www.katalon.com')
We are getting "org.openqa.selenium.WebDriverException: Specified firefox binary location does not exist or is not a real file: /usr/local/bin/firefox/firefox" exception when we ran the selenium web driver code via linux
Configuration:
aws-cli/1.7.38 Python/2.7.9 Linux/3.14.48-33.39.amzn1.x86_64
Amazon ElasticBeanStalk
Already installed firefox on /usr/local/bin/firefox/firefox
when i ran firefox --version the version clearly getting displayed in the console
Mozilla Firefox 38.1.0
File pathToBinary = new File("/usr/local/bin/firefox/firefox");
FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
fBinary.setEnvironmentProperty("DISPLAY", ":1");
FirefoxDriver driver = new FirefoxDriver(ffBinary,pro);
xvfb is already started. (Xvfb :1 -screen 0 1280x768x24)
Please kindly help me on how to resolve the issue?
This problem occurred due to selenium library and firefox version conflict issue.
I have the following setup:
Debian 7 (Headless with Xvfb)
Xvfb started via daemon at :0
Selenium 2.44 (declared in pom.xml)
Mozilla Firefox 35.0.1 (installed from firefox-mozilla-build)
Jenkins 1.598
I'm getting this exception when running the test:
java.lang.ExceptionInInitializerError: null
at org.openqa.selenium.firefox.internal.Executable.locateFirefoxBinaryFromSystemProperty(Executable.java:143)
at org.openqa.selenium.firefox.internal.Executable.<clinit>(Executable.java:43)
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:59)
testResult(com.Test) Time elapsed: 0.049 sec <<< FAILURE!
java.lang.NoClassDefFoundError: Could not initialize class org.openqa.selenium.firefox.internal.Executable
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:59)
I've tried so far;
Setting system property programatically:
System.setProperty("webdriver.firefox.bin", "/usr/bin/firefox");
Configuring it directly in the Webdriver:
File pathToBinary = new File("/usr/bin/firefox");
FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
FirefoxProfile ffProfile = new FirefoxProfile();
webDriver = new FirefoxDriver(ffBinary,ffProfile);
Passing the parameter via Maven
-Dwebdriver.firefox.bin=/usr/bin/firefox
All of above has failed.
I've setup another Jenkins on my Ubuntu 14.04 and it works fine.
I've run from my IDE, it works fine.
I've run from commandline on my PC, it works fine.
Is there any other option I can try? Something I overlooked?
Thanks in advance!
I am using firefox version 23.0.1 and selenium 2.35.0 jar. when i try to run the scripts , all scripts are failed with the error message saying "Failed to connect to binary FirefoxBinary(E:\Mozilla\firefox.exe) on port 7055" . please help me out to solve this issue.
Thanks in advance,
Manasa.
This problem could occur if your Firefox executable is not located in that location.
System.setProperty("webdriver.firefox.bin","PATH_TO_FIREFOX_HERE");
This code will update the location of Firefox in the system properties. In the event that this doesn't work, check to make sure the port is open on your computer by using netstat or a similar tool.
This should be the more appropriate answer for you boot bootstrap in your code -
FirefoxProfile profile = new FirefoxProfile();
FirefoxBinary binary = new FirefoxBinary(new File("C:\\path to firefox\\firefox.exe"));
driver = new FirefoxDriver(binary, profile);
Hope, it helps !
Regards,
Anand Chavan