This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Embedded Browser - Attach and Detach using UFT Developer Java SDK

Hello all,

I am trying to use an embedded browser application, and I can attach and detach using UFT One with provided methods like

WebUtil.AttachRemoteDebugging(...)

WebUtil.DetachRemoteDebugging(...)

The same I am trying to use with UFT Developer, and I am looking for the same type of methods here, and am using Java SDK. Appreciate any help if anyone came across on this one.

Browser.attach(....)   //To attach and working fine

//No method for detach
//Browser.close throws NotSupportedOperation

  • 0  

    It might be a bug, could you raise a support ticket with us?

  • 0 in reply to   

    Sure, Will do. Thanks.

  • 0  

    The detach method is not implemented in UFTD. The close method is for closing normal browser, not for embedded browser, so it throw NotSupportedOperation.

    If you want to perform the action like the WebUtil.DetachRemoteDebugging, you can OS api in Java to kill named "WebDriverHost.exe" and "chromedriver.exe" processes, it's same as WebUtil.DetachRemoteDebugging. And in most situation, not detach will not cause bad effect. And attach one address multiple times without detach is acceptable.

    Or if you want to use detach api in the code directly, you can open an enhanced request to our UFTD developer team.

    Can you tell me why you want to use detach method? Then I can help you to make choice.

  • 0 in reply to   

    Yes, already I am using process kill approach. As I noticed sometimes like attach didn't work properly before killing the existing instances, so wondered if there is an API method like we have in UFT One, so I do not need to follow the kill approach.
    I would follow the kill approach until we have a dedicated method in the API itself. 

    Thanks.

  • 0   in reply to 

    Attach didn't work properly maybe due to the existing instances occupy the connection to application, so this attach failed. Attach here is same as connect. Attach one address multiple times without detach is acceptable in a UFT run(UFT maintains a map to avoid re-attach in memory).

    You can continue to do as you say.