With Java I am able to open Firefox just fine with a URL I set using this code:
Runtime.getRuntime().exec("C:\\Program Files\\Mozilla Firefox\\firefox.exe" + " " + "http://www.website.com");
But if possible how can I then return the following data?
- If Firefox loaded successfully? (As a bool)
- If the URL(s) loaded successfully? (As a bool, or if using more than 1 URL as a bool array)
- The time taken to load (As a value/string, or if using more than 1 URL as a value/string array.
- The contents of the Firefox Web Console (As a string, or if using more than 1 URL as a string array)
Is there a way to do this and get back this type of data from Firefox or other programs that .exec is launching?