I am doing automation for my app. Here I am selecting a particular game.. here 3 list contain same date and same ..My would if I had games at same and time. How to write my code better way. here my code, I am read all and put it into array list..Here my logic is not a better approach… my senior told me to do it in multidimensional array…How to better way to check all the condition…

 List<String> totalData = new ArrayList<String>();
for(int j=0;j<totalData.size();j++) {

            String gameData= totalData.get(j);

            if((gameData.equals(away_team_name)))
            {
                continue;
            }

            if((gameData.equals(home_team_name)))
            {
                continue;
            }

        if((gameData.equals(game_date)))
             {
          WebElement line_up1 = AppSession.findElementByName(game_date);
          line_up1.click();
}
 Game date                   home team             away team
    06/29/2018 07:00:00 PM     Ball Hogs Ball Hogs    Tri-State Tri-State
    06/29/2018 08:00:00 PM     Power                  Ghost BALLERS
    06/29/2018 07:00:00 PM     Killer 3's             3's Company



Source link https://sqa.stackexchange.com/questions/35464/my-script-would-fail-if-i-had-multiple-games-at-same-data-and-time

LEAVE A REPLY

Please enter your comment!
Please enter your name here