Posts

Showing posts from September, 2015

Localization,Internationalization Testing

Image
Learn what is Localization Testing and How to perform it: It is very common to find websites that are now available in multiple languages. Global brands have now recognized that the only way to connect and create value is by introducing their business to locals in the language that is truly local. This process of adapting a product to different language, region and locale is called localization. A localized product creates more business opportunities and caters for growth and expansion. However, many organizations make the mistake of adapting localization towards the end of the development process or just before the product launch. In order to localize a product it is very important to find out if it is internationalized. Confused? An internationalized Product/application design is the one that can accommodate localized content such as characters in non-western letters, double byte languages, ability for text to expand as in European languages and contract as in Asian lan

Page Object Model

Image
Design patterns A Design pattern is a generic solution to a common software design/architecture problem. Implementation of these design patterns leads to inclusion of best practices and best solution, evolved over the time by others while working with similar problems. Page Object Model in Selenium A Page Object Model is a design pattern that can be implemented using selenium webdriver. It essentially models the pages/screen of the application as objects called Page Objects, all the functions that can be performed in the specific page are encapsulated in the page object of that screen. In this way any change made in the UI will only affect that screens page object class thus abstracting the changes from the test classes. Advantages of using Page Object Model 1.Increases code reusability - code to work with events of a page is written only once and used in different test cases 2.Improves code maintainability - any UI change leads to updating the code in page obje

Page scrolling using Selenium

Scrolling a webpage is required in automation when the application requires scrolling down or up to display additional information e.g. most of the e-commerce sites display only 10-20 products at a time and then load more products as the user scrolls down. In this tutorial we'll take example of flipkart website and automate the scrolling of webpage in order to fetch more results. In automation first we will launch filpkart.com, write a search term and then scroll down to fetch more results corresponding to that search term. Automating page scrolling will make use of "scrollBy" method of javascript. For executing the javascript method we will use Javascript executor. The scrollBy method takes two parameters one each for horizontal and vertical scroll in terms of pixels. JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("scrollBy(0, 2500)"); Following test script automates flipkart's scroll down functionality to test display