Reduce repetition in java code with dynamic object naming? -


a testcase aims access array of machines via dynamic objects names, following possible?

    string[][] mysession = new string["win7"]["firefox"]; //mysessionwin7firefox     string[][] mysession = new string["win7"]["ie"]; //mysessionwin7ie     string[][] mysession = new string["win10"]["edge"]; //mysessionwin10edge      mysession[win7][firefox] = new remotewebdriver...;     mysession[win7][firefox].get(myurl);     mysession[win10][edge].dostuff(); 


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -