1

I am new to Selenium Webdriver. I need to automate test cases where i'm giving input from a file for a field. how do i do that?

  • I believe your question has already been answered [here](https://stackoverflow.com/questions/8851051/selenium-webdriver-and-browsers-select-file-dialog#answer-8854733) – Dan Csharpster Jun 22 '17 at 22:11

1 Answers1

0

If you are wanting to create automated test cases using selenium-webdriver for an application, manage a xml configuration file. Using xml configuration files you can manage you test cases easily. Example configuration :

<test browser-name="firefox" domain="...">
    <!-- browser parameters -->
    <url-config>
        <!-- Test case..1 -->
        <!-- Test case..2 -->
        <!-- Test case..n -->
    </url-config>
    <forms>
        <!-- form 1 -->
        <!-- form 2 -->
        <!-- form n -->
    </forms>
</test>

You can also include .xsd for validate your driver settings.

Hope this gives you some idea.

Satish Pandey
  • 1,184
  • 4
  • 12
  • 32