I wrote a code to print all the texts(country list) present with the WebElement (div) list, using getText() without adding toString() to it prints some of the initial countries in the list not all, but if toString() is added to getText() then all the countries are printed, why is there a difference in the output, without using toString() prints some initial countries but why not all?
for(WebElement w : fromCountriesList)
System.out.println(w.getText().toString());
