How to work with json files to store properties | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos
30% Mid August Discount Avail now

Selenium Training Forum

How to work with json files to store properties

M
Post on 02/11/2015

We are using json files to store configurations and data, for example username, url etc

Can anyone help me how do I use these in my webconnector?
For example, driver.findelement(by.xpath(config.getproperty(element))).click();

what should we do, if we want to simulate the above using a json file?

M
Reply on 02/11/2015

so you want to extract data from json file?

M
Reply on 03/11/2015

Yes rt.

Please help

M
Reply on 03/11/2015

use json path library.


https://github.com/jayway/JsonPath