Questions tagged [selenium-java]

95 questions
-1
votes
1 answer

java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "this.driver" is null

I'm facing an error: java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "this.driver" is null Code and Error screenshot: Can I know why I am getting this error? I am trying to…
-1
votes
1 answer

should By locators in selenium be kept as instance or local variables?

I have seen examples put all the By locator fields at the top as instance variables, but if they are only used once within a method surely they should be local? Which is cleaner and easier to read?
teaaa
  • 1
  • 2
-1
votes
1 answer

How to launch Microsoft Edge in IE mode using Selenium Java

I'm launch Microsoft Edge in IE mode using Selenium Java. Can someone help me with the required configuration settings?
-2
votes
1 answer

After clicking a button it redirect to another webpage associated with it. when i write code to select object in that page i am not able select field

After clicking a button it redirect to another webpage associated with it. when i write code to select object in the new page i am not able select field in the new page public class trail { public static void main(String[] args) throws…
-2
votes
1 answer

@Test method is executed before @BeforeTest method is exited during multithreading

I want to create some test data in @BeforeTest method in parallel with threads to save data creation time. Test data to be used later in @Test methods. As a sample I have added Thread.sleep() for now. When I ran the test, once the threads are…
kiran kumar
  • 35
  • 3
  • 7
1 2 3 4 5 6
7