Actually I am checking the excel values whether they are displayed on the web page Mouse hover menu. The menu includes titles and the menu item links. The menu items in main menu and the sub links are in child menu. When I tried to collect all the links, I am getting them separately by finding with CSS. I want to get all the links in one array. I have used the below commands. Please help me how to get all the elements in one array. The developers code is attached as screen shots :
String AdminRoleAccessfilepath = "D:\\PMC
Automation\\AdminRoleAccess.xls";
FileInputStream AdminRoleFile=new
FileInputStream(AdminRoleAccessfilepath);
Workbook rwb=Workbook.getWorkbook(AdminRoleFile);
Sheet AdminRolesheet=rwb.getSheet("AdminRole");
int submenucolumnsize=AdminRolesheet.getRows();
int menucolumnsize=AdminRolesheet.getRows();
String[] arraysubmenu=new String[submenucolumnsize];
String[] arraymenu=new String[menucolumnsize];
ListSubTitlelist =
driver.findElements(By.cssSelector(".child_menu>a "));
List allSubTitleslist=new ArrayList<>();
ListTitleslist =
driver.findElements(By.cssSelector("#menu_nav>ul>li>a "));
int submenuui = 0;
for (int a=1;a "
+arraysubmenu[a]+ " existing on the Web Page" );
else
System.out.println("\nThe Sub Menu item in the UI-> "
+arraysubmenu[a]+ " not existing on the Web Page");
}
int menuui = 0;
for (int b=1;b "
+arraymenu[b]+ " existing on the Web Page" );
else
System.out.println("\nThe Title in the Menu in the UI-> "
+arraymenu[b]+ " not existing on the Web Page");
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)