1

I have to interact with already an opened browser and perform few clicks, Page navigation and read text from form controls. Can LeanFT has the capability to do so?

Adelin
  • 7,809
  • 5
  • 37
  • 65
Naren
  • 31
  • 3

1 Answers1

1

LeanFT can do that, and then some...

Basically, for LeanFT, almost anything can be discovered and interacted with. They do that via what they call an element Description.

It understands native technologies like Java, WPF, WinForms, Powerbuilder, Mobile, etc. and, obviously, Web.

In your case, you'd have to work with com.hp.lft.web package, which contains everything needed to discover anything web related, be it browsers, buttons, media elements, etc.

And, as already mentioned, you need to describe those elements via a description.

The parent element, the browser, can be reached in 3 ways, all by making use of the BrowserFactory class:

  • launching a browser: BrowserFactory.launch with the type of browser to launch
  • attaching to an already opened browser: BrowserFactory.attach with a description
  • getting all opened browsers: BrowserFactory.getAllOpenBrowser with a description

All these methods will return instances of Browser, which have ways to further control a browser.

You can find samples of these methods in LeanFT's official documentation.
For visibility, I'll post the relevant attach sample:

Browser aboutTab = BrowserFactory.attach(new BrowserDescription.Builder().title("Cruises: Mercury Tours").build());
Adelin
  • 7,809
  • 5
  • 37
  • 65