1.How can we can select the options from drop down ? ======================================== *By using Select class,we can select the options from single select and multi select dropdown. 2.Whether Select is a interface or class? ============================= *Select is a class. 3.Write a code to print all the options in DropDown? ======================================================= *getOptions() method is used to get all options in dropdown. * getOptions() method will return List then iterating each WebElement and using getText() method we can print all the dropdown values. 4.Can we select multiple values in DropDown? ============================================= *Yes,we can select multiple values in a DropDown if it is a multiselect dropdown. 5.How to check the dropdown is single select or multi select dropdown? =================================================== *isMultiple() method from Select class can be used to check whether the dropdown is single select or multi select dropdown 6.What are the methods available in select class? =================================== *selectByValue(); *selectByVisibleText(); *selectByIndex(); *getOptions(); *getAllSelectedoptions(); *getFirstselectedoptions(); *isMultiple(); *deSelectByValue(); *deSelectByVisibleText(); *deSelectByIndex(); *deSelectAll() 7.can we deselect the options in dropdown? =============================== Yes, we can deselect the options in dropdown using the below methods. *deSelectByValue(); *deSelectByVisibleText(); *deSelectByIndex(); *deSelectAll() 8.Write a code to print selected options in dropdown? ======================================================= *By using getAllSelectedoptions() method we can get all the selected WebElements. Select refName = new Select(); refName.getAllSelectedoptions(); *getAllSelectedoptions() method will return List then iterating each WebElement and using getText() method we can print all the selected options from dropdown. 9.Write the return type of all methods available in Select class? ============================================================== *selectByValue() -void *selectByVisibleText() -void *selectByIndex() -void *getOptions() -List *getAllSelectedoptions() -List *getFirstselectedoption() -WebElement *isMultiple() -boolean *deSelectByValue() -void *deSelectByVisibleText() -void *deSelectAll() -void *deSelectByIndex() -void 10.What is the purpose of windows Handling? ============================================ *Whenever we have multiple windows,to switch the program control between different windows, you can go for windows handling concept in Selenium. We can perform switch the control between windows in 3 ways: *using window title *using window url *using window id 11.Write a method used to get the window id of all the windows opened? =================================================== *Set refname= driverRefName.switchTo.getWindowsHandles(); 12.What are the different types of arguments you can pass in windows()? =================================================================== *id *url *title But all the arguments are of String type. 13.When you have multiple windows opened ,how to directly switch from parent window to 8 th child window? ====================================================================== List allWindowsId=(List)driver.getWindowHandles(); driver.SwitchTo().window(allWindowsId.get(7));