Regarding the great explanation of LinkedHashmap: I recently used it like this:
LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();
Then a series of 'put' statements were used to load the data. Reason I am pointing this out is that I don't see where this use fits into the "5 constructors" laid out in the article. Is this yet another use of the class?
0 down vote favorite
Hi all
My code is
Set windowsid = driver.getWindowHandles();
Iterator iterate = windowsid.iterator();
while(iterate.hasNext()){
System.out.println(iterate.next());
}
String mainwindow_id = iterate.next();
String tabbedwindow_id = iterate.next();
I get an error @ " -- String mainwindow_id = iterate.next(); -- "
Stating the below, Line 45 is the one i have in quotes.
I have declared the Set as String
Please Help !
Exception in thread "main" java.util.NoSuchElementException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:375)
at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384)
at windows.traverse.main(traverse.java:45)
LinkedHashMapSteve October 6, 2011 at 12:43 AM
Regarding the great explanation of LinkedHashmap: I recently used it like this: LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>(); Then a series of 'put' statements were used to load the data. Reason I am pointing this out is that I don't see where this use fits into the "5 constructors" laid out in the article. Is this yet another use of the class?
Thank youabc March 6, 2012 at 10:08 PM
Thanks for the clear and crisp explanation!
Wedriver Windows popup handlingRam July 6, 2012 at 1:49 PM
0 down vote favorite Hi all My code is Set windowsid = driver.getWindowHandles(); Iterator iterate = windowsid.iterator(); while(iterate.hasNext()){ System.out.println(iterate.next()); } String mainwindow_id = iterate.next(); String tabbedwindow_id = iterate.next(); I get an error @ " -- String mainwindow_id = iterate.next(); -- " Stating the below, Line 45 is the one i have in quotes. I have declared the Set as String Please Help ! Exception in thread "main" java.util.NoSuchElementException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:375) at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:384) at windows.traverse.main(traverse.java:45)
Post your Comment