Skip to main content
added 24 characters in body
Source Link
PDHide
  • 11.1k
  • 2
  • 16
  • 43

Hi size() returns integer and you are comparing with string

You can use the size() method of java. util. ArrayList to find the length or size of ArrayList in Java. The size() method returns an integer equal to a number of elements present in the array list. https://www.java67.com/2016/07/how-to-find-length-size-of-arraylist-in-java.html

So the fix would be to change "3" to 3:

Assert.assertEquals(driver.findElements(By.xpath("//input[@class='radioButton']")).size(), 3);

Hi size() returns integer and you are comparing with string

You can use the size() method of java. util. ArrayList to find the length or size of ArrayList in Java. The size() method returns an integer equal to a number of elements present in the array list. https://www.java67.com/2016/07/how-to-find-length-size-of-arraylist-in-java.html

change "3" to 3:

Assert.assertEquals(driver.findElements(By.xpath("//input[@class='radioButton']")).size(), 3);

Hi size() returns integer and you are comparing with string

You can use the size() method of java. util. ArrayList to find the length or size of ArrayList in Java. The size() method returns an integer equal to a number of elements present in the array list. https://www.java67.com/2016/07/how-to-find-length-size-of-arraylist-in-java.html

So the fix would be to change "3" to 3:

Assert.assertEquals(driver.findElements(By.xpath("//input[@class='radioButton']")).size(), 3);
Source Link
PDHide
  • 11.1k
  • 2
  • 16
  • 43

Hi size() returns integer and you are comparing with string

You can use the size() method of java. util. ArrayList to find the length or size of ArrayList in Java. The size() method returns an integer equal to a number of elements present in the array list. https://www.java67.com/2016/07/how-to-find-length-size-of-arraylist-in-java.html

change "3" to 3:

Assert.assertEquals(driver.findElements(By.xpath("//input[@class='radioButton']")).size(), 3);