Complete newbie here…started trying to learn selenium with java this month. Having troubles locating one button, because it seems to lack name id, link and its class is weird looking. Can someone help me write a locator for it? Its an accept cookies button. Answer You can use either of the xpath option to identify the element. OR
Tag: selenium
Selenium, Scrolling page
I am trying to scroll webpage with Selenium- “https://jobsearch.az/vacancies”. But, you see when you open it and click on vacancy, there are two pages side by side to scroll. I need to scroll the one in the middle, so selenium can go and take info from other jobs too. But, now, it stops when it comes to 14, which is
casting of js.executeAsyncScript output to Map
I want to cast the output of below script into Map<string,string> but it is showing “java.lang.String cannot be cast to java.util.Map”error. How can we cast that in map?? Answer I assume your response is in Json format. You can use Gson to convert the String to Map.
how to handle script time out for javascript executer for fetch call
I am executing the below javascript using selenium java script exceuter, I want to return the response fromt the fetch call and want to store it in java variable in code. But below code is showing script time out, any suggestions how can I achive above requirements ??? Answer I’m not how to escape the quotes but the javascript should
Null pointer exception while running selenium test. I am using Page object model
Below is my Testbase class: My VerifyLaydownlogintest as below: And this is my Login page class: This is error of NPE: I tried to resolve this but unable to find the root cause. Where am I going wrong? My config.properties Answer You are using TestNG as your test automation framework. In TestNG, execution will take place according to the annotation
How to click on Close icon/element on the Facebook sign-up page using Selenium Java?
I am new to Selenium and learning. On the Facebook sign-up page I want to click on the X as shown in the below screenshot, but I am unable to click it. It’s an img element. Answer The desired element is an <img> tag which is the preceding-sibling of a <div> tag which is the immediate ancestor of the <div>
I can’t work out why “this.driver is null” when running an assertion
First time poster so apologies if I’m breaking some guidelines. I’m teaching myself Java/Selenium/Chromedriver and I’ve hit the first problem that I haven’t been able to work out myself. I’ll do my best to represent it below but please ask for more info if I haven’t included what I needed to! Here is the test: As you can see, I
How to run a Cucumber Step multiple times with different data?
I am trying to automate one scenario using Cucumber. Step Then Create item actually takes values from first row only. What I want to do is execute step Then Create item 2 times, before moving to step Then assigns to CRSA. But my code is taking values from first row only (0P00A). How to take values from both rows? Answer
Cannot invoke “org.openqa.selenium.WebElement.click()” because “this.hotelsLink” is null Maven
I try to do some tests using Selenium, but I can’t test what I do HomePage.java Hooks.java Error: SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Starting ChromeDriver 101.0.4951.41 (93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904}) on port 38072 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was
How to Validate Multiple screen using selenium with eclilpse?
I am new to selenium. I am validating two screens, Login and Password screens using selenium. The First screen is Login. If the username is correct then it will move to next screen that is Password. But in the Password screen the driver not putting the password into the input box, nothing is happening. It stops at Password screen. Any