2

In my application flow, a new tab is opened in Google Chrome after clicking a button, I want to fire more click events and test the application in this new tab but the click events are not getting fired.

Below is what I have tried so far:

IBrowser myNewTab = BrowserFactory.Attach(new BrowserDescription
{
    Title = "MyNewTabTitle"
});

IWebElement newTabObject = myNewTab.Describe<IWebElement>(new WebElementDescription
 {
     XPath = "XPath_Of_My_Control_On_New_Tab"
 });
newTabObject.Click();

But after executing this I am still getting the error as, threw exception:

HP.LFT.SDK.ReplayObjectNotFoundException: attachApplication

I have also tried to apply different properties for newTabObject like Title, Url.

1
  • After clicking on it are you directly navigating to the newly opened tab?
    – ChathuD
    Commented Jan 19, 2017 at 3:39

1 Answer 1

1

You need to switch to the new tab which is a new window.

https://stackoverflow.com/questions/9588827/how-to-switch-to-the-new-browser-window-which-opens-after-click-on-the-button

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.