I am a test automation engineer and use Java with Selenium Webdriver for scripting my tests. My question is this-

  1. A webpage has a header with columns, along with column filters. It is similar to MS Excel column filters.
  2. I have to apply filters column by column to finally arrive at a single record.
  3. Double click on the record to proceed with my test execution. Can anyone tell me how I can achieve this using Java and Selenium Webdriver?


  • What is your exact issue? You can't expect us to write your entire code.
    – FDM
    Commented Mar 30, 2016 at 15:49
  • My bad! I wanted to ask for the logic indeed, though I did not intend to ask for the exact code in Java.
    – user6376
    Commented Apr 6, 2016 at 13:25

2 Answers 2


Like Peter Masiar said, you'll do it the same way you would do it manually.

  1. Record the steps you manually perform to complete this. (ex: (1)Select column A filter and enter value, (2)Select column B filter and enter value, etc. etc. Finally, Click on result)
  2. Write the automation code to complete these actions.

Step (2) is going be highly dependent on the nature of your form. Ex: Are the columns static? What are the values that can be entered in the filters? What is the goal of the test(s).

If you are trying to test that the filters work as expected (ex: Find all applicable results, and DO NOT find invalid results, then I might do something like the following:

  1. Code that filters column A by some entry or value selection
  2. Code to check each presented result to match entry value to result field value
  3. Some method of determining that ALL results were found (ex: a database query and comparing the number of results.

Then, I would expand this to use a "data driven" approach so that you can test combinations of which columns you filter with specific values and combinations.

Hope this helps.


Click on elements (locate them by any appropriate means) in webdriver exactly like user does.

If you know how to do it by hand, make webdriver to perform same actions.

If you do not know how to do it by hand, learn how.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.