Advice on Application Model in LeanFT v12

Hi,

We have a windows application that embeds a Cefglue browser. 

We are looking at writing a LeanFT test using C#, and we want to use application model.

I have two questions:

1) How do I instantiate the application model without the browser instance?

Most examples I see do this, but at the start of the windows application I don't have a browser yet. It only comes later. At the start I only have the windows application.

var browser = BrowserFactory.Attach(new BrowserDescription
{
Type = BrowserType.Chrome
});

var appModel = new MyApplicationModel(browser);

In our instance, as we use CEF, there is no "browser" per se, so it is not possible to pass that to the constructor of the application model.

Can someone please provide an example on how we can use Application model without browser?

 

2) How many application models should we have? One for each technology stack? One for each "functionality"? What is the adequate design?

 

Cheers

Michael

 

 

  • Hi Michael

    i would like to help, but i have a couple of questions before:

    1. Which version of LeanFT are you using ?

    2. What technology is the embeding application written in ?

    3. Which browser are you embeding - chrome browser ? a different one ?

     

    Regarding your questions:

    1. You can instantiate the App Model with the Window object of your applciation. this should be just fine while the browser variable is empty.

     

    2. The best practice is to create a differnt app model for each technology that you test. you CAN have all the objects in the same app model but in order to instantiate it seperatly for the different apps you are testing - it's better to seperate the technologies.

     

    let me know what you think and please try to answer the questions, so it will be easier to help.

    Thanks 

    Aviad