Hashtable within Hashtable | Selenium Forum
M
Posted on 14/08/2016
Hashtable<String,Hashtable<String,String>> table = new Hashtable<String,HashTable<String,String>>();
Java is giving me error on this line

M
Replied on 15/08/2016

i cannot see your code in line 17. please send a screen shot again.


M
Replied on 16/08/2016

PFA

Responsive image

M
Replied on 17/08/2016

you cannot do that.


M
Replied on 17/08/2016

can you please let me know the correct way


M
Replied on 18/08/2016

try this q/a

http://stackoverflow.com/questions/1049833/multi-valued-hashtable-in-java


M
Replied on 18/08/2016

I too encountered same issue earlier.

As per your screenshot, letter "t" in "Hashtable" is used in upper case. can you modify it and check again.

Modified line:
Hashtable<String,Hashtable<String,String>>table= new Hashtable<String,Hashtable<String,String>>();

Anyways, even after modifying it, check with Ashish team for exact rootcause of this issue.

Responsive image

M
Replied on 18/08/2016

Thanks SK.. It worked...
[i:2mlf1e6q]Hashtable<String,Hashtable<String,String>> table = new Hashtable<String,Hashtable<String,String>>();
table.put("name",[b:2mlf1e6q] table1[/b:2mlf1e6q]);
table.put("zip", [b:2mlf1e6q]table2[/b:2mlf1e6q]);[/i:2mlf1e6q]
Also had to remove "" from table1 and table2