In eclipse IDE, I have created a basic cucumber framework by using Maven project. I have added all the dependencies required in pom.xml.For TestNG plugin added below dependencies. But ‘TestNG Suite’ option was not coming in preferences,so installed TestNG through Help->Install New Software. Framework is having feature file(scenario is described),stepdefinitions(code/logic given) and runner class(To map feature with stepdefinitions file and
Tag: selenium-webdriver
Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)
I develop the selenium code that: I’m getting the error that is: I’m trying to solve this issue according to This Solution by upgrading guava-21.0. But I’m still getting this error. could anyone give a solution to solve it? Answer This error message… …implies that the JVM was unable to initiate/spawn your program. As @GhostCat pointed your main issue is
Selenium returning the hidden element as visible, clickable and enabled when element is hidden & not clickable
I want to open the filters only if they are not already open. For that, I’m checking if “Apply Filter” button is visible/clickable. To my surprise, I’m getting the element as visible/clickable even though it is not. Button code mentioned below, Method trying to check if element is clickable XPath of the button: xpath = “//button[@id=’filterButton’ and text()[contains(.,’Filter’)]] Answer Though
Selenium and Java: How do I get all of the text after a WebElement
I am coding a program in Java using WebDriver and am having a little bit of trouble getting the text after the select webElement. The HTML code for the part of the website that I want is as follows: The textbox class codes for a search bar and a drop down bar of languages My Java code is currently able
“FluentWait cannot be applied” error in until() while checking for a string
I have a Selenium test that checks if a certain string can be seen on the testpage. My idea is to use an explicitwait if the page doesn’t load immediately. After that I did: So it has a waiting time of max 10 seconds before continuing. If it sees the element within 10 seconds the test continues. But i get
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
Using Selenium how to get network request [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 6 months ago. This post was edited and submitted for review 19 days ago. Improve this question
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
Finding element using attribute ignoring case
Is there any way to find element using an attribute which must not be case sensitive? Think that, I want to find element by a title like this: But change in the title text won’t affect my WebElement. Answer You can xpath to achieve this. look at below example. The above xpath will convert all uppercase letters from title to
How to order feature files in Cucumber test suite?
Currently, I have found that cucumber test suite runs the feature files alphabetically. Please let me know if there is any option/configuration that I might be missing. Thanks. Answer In cucumber 4.2.0 added cli option –order, see changelog and this example.