locked
How to locate new browser window when no title in the window using coded ui ? RRS feed

  • Question

  • I am working on coded ui project some one give solution for my issue...

    By clicking a link a new window is opening, I can access controls in the new window when tag has a value using BrowserWindow.Locate("title").

    How can i access the controls of new browser window when title tag has no value in it..

    Thanks in advance

    Karthik.R





    • Edited by karthikravi Tuesday, January 27, 2015 12:35 PM
    Wednesday, January 21, 2015 4:32 PM

Answers

  • Hi karthikravi,

    Thanks for your reply.

    From your description, you mean that the new browser windows itself have no the title value property in the develop application, am I right?

    If yes, I suggest you can try to add other searchproperties to find the new browser windows in coded UI test.

    Or I suggest you can also try to record the UI action using coded UI test Builder and then generated code check this issue.

    Reference:

    https://msdn.microsoft.com/en-us/library/dd286726.aspx

    Hope it help you!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, January 23, 2015 5:03 AM

All replies

  • Hi karthikravi,

    >>How can i access the controls of new browser window when title tag has no value in it..

    As far as I know that it is not possible to access the controls of new browser window when the title tag has no value. Since we record a UI control action using coded UI test for the web application, we find the UI control by hierarchy in the UI Control Map list.

    If the title tag has no value, we will not use the BrowserWindow.Locate() method find the new browser window so that we can not find the UI test by the searchproperties.

    So when we want to use BrowserWindow.Locate() to launch the new browser window, we will need to add the title tag value.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Tina-Shi Thursday, January 22, 2015 8:43 AM
    Thursday, January 22, 2015 8:38 AM
  • Is there any other way other than Windows.Locate("") method.
    Thursday, January 22, 2015 9:16 AM
  • Hi karthikravi,

    >>Is there any other way other than Windows.Locate("") method.

    Based on your issue, I suggest you can try to use the BrowserWindow.Launch() method to launch the new browser window.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 22, 2015 10:06 AM
  • Hi Tina-Shi,

    Thanks for your valuable replies..... I don't have a rights to add title to the developed code, so can you suggest any other way for this issue.

    Thursday, January 22, 2015 11:21 AM
  • Hi karthikravi,

    Thanks for your reply.

    From your description, you mean that the new browser windows itself have no the title value property in the develop application, am I right?

    If yes, I suggest you can try to add other searchproperties to find the new browser windows in coded UI test.

    Or I suggest you can also try to record the UI action using coded UI test Builder and then generated code check this issue.

    Reference:

    https://msdn.microsoft.com/en-us/library/dd286726.aspx

    Hope it help you!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, January 23, 2015 5:03 AM
  • Hi karthikravi,

    Could you please tell me what about this problem now?

    If you have been solved the issue, would you mind sharing us the solution here? So it would be helpful for other members who get the same issue.

    If not, please let us know the latest information about it.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 27, 2015 1:28 PM