API Concepts: Overview and Target audience: The intend of this document is to provide the basics of API (Application Platform Interface) on how the communication between two different applications and software’s happen in real world. Since the growing world needs more connectivity between different software’s and which can be achieved simply through standard protocols. Many of the today’s manual testing job opportunities requires API knowledge, since API testing is no longer a skill. What happen if tester is supposed to test an integration and data flow between two different systems when Downstream or Upstream systems are not available? In such cases many of the issues will be undiscovered and will appear during late in the game. Which will cost too much to any project. To overcome this situation, testers needs to have understanding on how API actually works and how communication really happen. In below article you will find basics of API from tester’s point of view. Introducti...
Getting all the options from Drop down field is easy task. We need to use method getOptions() which will give list of options in the form of Webelements. We can convert webelement list in String using getText() method and can save it in desired List. Below code snippet will help to get all the options from drop down: Select select = new Select(driver.findElement(By.id(“dropdown_7”))); // This will get all the options from drop down. List<WebElement> list = select.getOptions(); List<String> stringOptions = new ArrayList<String>(); // This will get text from the webelement and save it to some other List for(WebElement s: list) { stringOptions.add(s.getText().trim()); } // This will print all the String options. for(String h : stringOptions) { System.out.println(h); }
Selecting date in date picker widget, is exactly same as fetching values from web tables. Date picker is also a web table in kind. so the code explained earlier on on how to fetch values from web table will work here as well. Please find below code to select date in any date picker.
Comments
Post a Comment