我正在尝试获取getOpenURL()
在 LeanFT 中使用的打开浏览器的 URL。
我的代码如下:
String url = BrowserFactory.attach(new BrowserDescription.Builder().build()).getOpenURL();
System.out.println("Opened Browser URL is:" +url);
它执行时出现以下错误:
Exception in thread "main" com.hp.lft.sdk.ReplayObjectNotFoundException: attachApplication
at com.hp.lft.sdk.internal.ReplayExceptionFactory$1.create(ReplayExceptionFactory.java:34)
at com.hp.lft.sdk.internal.ReplayExceptionFactory.createOrDefault(ReplayExceptionFactory.java:197)
at com.hp.lft.sdk.internal.ReplayExceptionFactory.createOrDefault(ReplayExceptionFactory.java:21)
at com.hp.lft.sdk.internal.web.BrowserErrorHandler.onError(BrowserErrorHandler.java:38)
at com.hp.lft.sdk.internal.CommunicationClientImpl.handleError(CommunicationClientImpl.java:221)
at com.hp.lft.sdk.internal.CommunicationClientImpl.send(CommunicationClientImpl.java:96)
at com.hp.lft.sdk.web.BrowserFactory$BrowserFactoryInstance$3.invoke(BrowserFactory.java:142)
at com.hp.lft.sdk.web.BrowserFactory$BrowserFactoryInstance$3.invoke(BrowserFactory.java:131)
at com.hp.lft.sdk.internal.TestObjectOperationWrapper.executeWithEvents(TestObjectOperationWrapper.java:120)
at com.hp.lft.sdk.internal.TestObjectOperationWrapper.executeWithEvents(TestObjectOperationWrapper.java:97)
at com.hp.lft.sdk.web.BrowserFactory$BrowserFactoryInstance.attach(BrowserFactory.java:150)
at com.hp.lft.sdk.web.BrowserFactory.attach(BrowserFactory.java:61)
at com.optum.comet.utilities.TestWebHierarchy.main(TestWebHierarchy.java:88)
我做错了什么,你能指教吗?