Highlighted
New Member.
307 views

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

 

 

0 Likes
1 Reply
Highlighted
Respected Contributor.
Respected Contributor.

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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.