Below code i was used in Selenium Eclipse, But i get a error shown in this line “String childid = it.next();” I am unable to traverse parent window to child window import java.util.Iterator; …
Tag: selenium
Java cucumber Selenium : NullPointerException for scenario.write for the first scenario on before tag
I am getting the NullPointerException when the code below code is executed. Note that the exception is recieved only for the first cucumber scenario executed. There is no exception for the second scenario. I am actually trying to insert the timestamp before start of each scenario. Please advise how this issue can be fixed. Any help will be appreciated. I
How to click search field in play store android appium?
enter image description hereI cant click google play store search field How can i click and sendkeys search field play store. Answer Make sure your driver is not null. Try to find the search field by CSS Like this: android.widget.EditText[*] Or android.widget.EditText[] Or by Xpath: //*[@value=’Uygulama ve oyun arayın’]
Java Selenium stale element reference, using AjaxLocatorFactory
I have a super-class Component, inside this class I store common ways to access elements attached to the component. In the Component constructor, I initElements with the pagefactory As I understand it, this will automatically keep element reference fresh, as long as the elements are annotated by the @FindBy annotation. I have a specialized Component called SearchResultRow which extends Component.
selenium.ScriptTimeoutException: java.util.concurrent.TimeoutException
I have Cucumber tests that run in parallel via Maven Surefire plugin. Sometimes the code throws me an error: selenium.ScriptTimeoutException: java.util.concurrent.TimeoutException which is obviously related to parallel run. But I have no idea how to avoid it. Here is the whole error log: Answer So the solution was to restrict the number of parallel runs because of resources on my
what is execution order of TestNG?
Parent class has @BeforeClass. Child class has @BeforeClass and @Test. What is an execution order? What is execution order if @BeforeClass methods’ names in both classes are the same? Answer First @BeforeClass in parent class is executed, then @BeforeClass in child class. If @BeforeClass name is the same in parent and child class, then you are just overriding the method
How to print exceptions on console? I am using TestNG and Maven
I want to see the exceptions on console. I am using TestNG with Maven as a build tool. I have defined my testng.xml in the Maven surefire plugin. Answer https://www.javadoc.io/doc/org.testng/testng/latest/org/testng/reporters/VerboseReporter.html you should use above reporter , but the constructor expects a string so you cannot initialize it using testng.xml ( if any one knows how to pass string argument to
Code works in debugging mode but not when executed Normally in JAVA
Tried the below code on this demo site where I find an product from the productlist and then try to click on the checkbox against it. When executed normally StaleElementException gets displayed but when executed on debug mode then it gets executed successfully. What could the solution for it ?? The exception is: The code is: Answer StaleElementException: Basically, when
Element not clickable when using FindElement on another WebElement
I have a weird problem: When I locate an element via: I can’t click e2, because: “Element < div class=”c2″ > could not be scrolled into view.” BUT when I locate e2 via: it works. (Also when checking e2.getLocation() the coordinates are different, and only correct in the second snippet). I think Selenium doesn’t like the “//.”, because: also works.
What is a java binding? Is it same as language binding? What do you mean by ‘people can use former json protocol using java bindings? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I was reading the following site: https://medium.com/@juanba48/selenium-4-is-now-w3c-compliant-what-does-this-mean-ceb44de2d29b and have difficulty understanding terminologies like java bindings, language bindings and how different