Auto-suggestion or auto-complete is a useful feature available on web pages. It is used to provide possible suggestions to a user based on their input on a search box or any other input field on the webpage.
- Enhanced User Experience
- Improved Search Efficiency
- Higher Accuracy due to auto corrections
- Mobile-Friendly Experience
- Wider website exploration
- Delay in auto-suggestion list
- Highly dynamic content
- Cross-browser compatibility
- Pop-up Auto-suggestion windows
- Using Explicit Waits
- Unique WebElement locators
- Verifying the suggestion value
- Using keyboard events
- Cross-browser testing
This repository contains reference code to handle auto-suggestions using different approaches on Google and Amazon websites.
- Handling auto-suggestion using the entire auto-suggestion list for Google search
- Handling auto-suggestion using keyboard actions for Google search
- Handling auto-suggestion using web scraping for Google search
- Handling auto-suggestion using web scraping for Amazon search
It is created using Selenium with Java, TestNG and Maven.
This is the list of tools, being used in this framework:
- Apache Maven
- Java 8
- Selenium Cloud Grid - LambdaTest Platform
- TestNG Framework
- Import this project in Eclipse/IntelliJ as “Existing Maven Project”
- Go to the test file and Run test case for your desired case.
- You can see the logs coming up on Console as your execution progresses.
- Since we are using RemoteWebDriver and executing on Cloud Grid platform, LambdaTest, you can login to same and view detailed logs on dashboard.