Skip to content
Advertisement

Tag: selenium

cannot find Chrome binary error on Jenkins using maven and WebDriverManager

I’m trying to run my test (Selenium+junit+cucumber+Maven) on Jenkins. In my definition class I’m not pointing to Chrome binary but rather use WebDriverManager: @Given(“^I navigate to page$”) It works fine on my machine (Win), but when I’m trying to execute this on Jenkins (Ubuntu box), I get error: org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-1047-aws

Unable to click a button in Selenium

I’m facing a tough time clicking a button from Selenium. Here’s the DOM: http://pasteboard.co/GHIjMd6.png I’ve declared the button WebElement this way using Xpath (a valid Xpath that returns one node as per Firepath): I’ve tried clicking the said button with send_this_msg_btn Xpath in below mentioned ways, but none of them work for me. WebDriver’s click() method : send_this_msg_btn.click() JavaScriptExecutor: Actions

Java Selenium get JSON response body

I using Java with Selenium webdriver and I wondering is it possible to get JSON body response? I asking because it is possible to get JSON request body using this code: but I can’t get body from response but response exist also in this log. Is any way to get response body? Answer Edit-2 Because of a open issue with

java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property

Error I am getting the below exception with System.getProperty Exception in thread “main” java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases at com.google.common.base.Preconditions.checkState(Preconditions.java:738) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124) at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:41) at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:115) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:330) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:207) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:137) at com.merchantPlatform.MerchantPlatformTest.main(MerchantPlatformTest.java:20) Answer

Nested loop in RobotFramework

I need to create a nested loop in Robot framework. Can you please Help me do it? I need to have a nested loop which compares all the ${text} with all the @{lines} in the file. Thanks in Advance Answer No nested loops in RF; that can be done only by calling a keyword with the inner loop, in the

How to handle authentication popup in Chrome with Selenium WebDriver using Java

I am trying to handle an authentication pop-up in one of my new Webdriver scripts. I have a working solution for IE, but I am struggling with Chrome. IE was as simple as following the advice on [this page]:How to handle authentication popup with Selenium WebDriver using Java. That thread doesn’t show a great solution for Chrome, although several commentors

Not able to create object of ExtentReports

I am new to extent reporting. I am using Selenium Webdriver and want to use Extent reports with it. But my code is not able to create ExtentReport object. The above code is giving exception as : Using the below configuration : if anyone have idea. Please help. Answer I tested your code. It shows no exception at my end.

Advertisement