How to accomodate both BaseState and Browser single silk4j.settings file?
What code are you using for the basestates in your script?
The error indicates that you have used BaseState while declaring the browser.
You need to use BrowserBaseState for a browser. For example:
BrowserBaseState iexplorer = new BrowserBaseState(BrowserType.InternetExplorer, "http://demo.borland.com");
UFT | UFT Mobile | Silk Test
Yes , I have used BrowserBaseState for the browser and basestate for the Rumba application.Since the Rumba part gets executed first , I get an error saying the silk4j.settings has base state and not Browser Base State info.
You can simply create 2 .settings files, one with the Rumba basestate information and another with the Browser basestate information.
- Remove all existing application configurations from your Silk4J project
- Add an application configuration for Rumba
- Rename the silk4j.settings file to rumba.settings
- Return to the application configurations dialog, which should now be blank
- Click add application configuration and add the browser configuration
- A new silk4j.settings file will be generated with the BrowserBaseState information
In you code you can simply invoke each application as follows:
BaseState rumba = new BaseState("rumba.settings");
BrowserBaseState browser = new BrowserBaseState("silk4j.settings");
The only other alternative, is to simply hardcode one of the base states per @Colin Moynes suggestion. For example, to launch Chrome:
BrowserBaseState chrome = new BrowserBaseState(BrowserType.GoogleChrome, "https://my-app-url");
I hope that helps.