In coded ui how do you correctly retrieve a browser window that contains an embedded Adobe PDF reader in browser

I'am running across this issue when I'm debugging or running my coded UI automation project, where i get the exception labeled "{"COM object that has been separated from its underlying RCW cannot be used." System.Exception {System.Runtime.InteropServices.InvalidComObjectException}"
everytime i come from a browser window that contains a pdf reader embedded in it. This happens every time I retrieve the window and try to click back. It barfs when i perform the back method on it. I've tried different things but none has worked including
the playback wait.
var hereIsmypdf = ReturnPDFDoc();
public BrowserWindow ReturnPDFDoc()
Playback.Wait(1000);
var myPdFdoc = GlobalVariables.Browser;
return myPdFdoc;
hereIsmypdf.Back();
skinny_Will

Hi skinny_Will,
<<"{"COM object that has been separated from its underlying RCW cannot be used." System.Exception {System.Runtime.InteropServices.InvalidComObjectException
According this exception error message, I did some research about it. I know that this exception error is occurred in
COM object which was disposed if you are using the COM objects in a same static class or variables which ware shared between tests.
So please you refer the following blog to use ExecutionThread element to instruct the test to use the MTA threading model. This way, the static instance of "store" can be shared across tests.
http://blogs.msdn.com/b/martijnh/archive/2009/12/31/unit-testing-com-object-that-has-been-separated-from-its-underlying-rcw-cannot-be-used.aspx
Note: if you are using the VS2013 to create the coded UI test, you will need to add a test setting file to add this
ExecutionThread.
https://msdn.microsoft.com/en-us/library/ee256991.aspx?f=255&MSPPError=-2147217396
In addition, ad you said that when you playback the browser window that contains an embedded Adobe PDF reader and then it could not work.
I suggest you could try to add more searchproperties to find this target control and then check this issue.
I find a similar thread about your issue, please refer the Steve's code to check your issue.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/73445915-ac08-47de-8bab-b6b07294d0c2/coded-ui-test-wont-find-an-pdf-browser-window-it-times-out?forum=vsunittest
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.

Similar Messages

  • How do you correct the merging of contacts, calendars, etc with other members of your family on your account?

    How do you correct the merging of contacts, calendars, etc with other members of your family on your account?

    Wow!
    I'm not going to be of much use regarding answers but I sure am going to watching this post like a hawk for any replies. My package is a slightly diluted version of this and I do find the BBtalk and data limits hard to make the most of as well.
    If nothing else this totally highlights how complicated BT have managed to make their packages.
    A cynic would assume that they are trying to catch us out at every step and for us to either be overspending or not really getting the moneys worth.

  • How do you correct syntax errors in OSX 10.9.3?

    How do you correct syntax errors in OSX 10.9.3?
    Hal Frederick

    Hal Frederick wrote:
    I amm double-clicking on the Disk Utility icon in the Utilities Folder.
    In that case, I'm with Tom in wanting to see a screen shot ot the error message. "syntax error" is a most unusual thing for Disk Utility to say in the GUI environment.

  • TS1135 how can you correct just a few words on the text in the flap of a iPhoto book? do you have to rewrite it all?

    How can you correct just a few words in the text on the flap of iphoto book?

    Select it and change it - exactly like you edit any text on yoru Mac
    LN

  • HAs any one having problems printing a playlist from itunes Version 11, How do you correct this problem

    Downloaded Itunes Ver.11 and now I can't prin a playlist ...All the titles come out brunchup and you can't read it.How do you correct this problem???????

    Downloaded Itunes Ver.11 and now I can't prin a playlist ...All the titles come out brunchup and you can't read it.How do you correct this problem???????

  • Music is show up as a Movie in iTunes, How do you correct?

    Music is show up as a Movie in the newest version of  iTunes, How do you correct library?

    Hello jminer68
    Check out the article below for troubleshooting your iPad to show up in iTunes.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • The recent software update on my HTC One has caused errors with Exchange ActiveSync issues. Calendar, mail and tasks sync fine but contacts won't sync. How do you correct this?

    The recent software update on my HTC One has caused errors with Exchange ActiveSync issues. Calendar, mail and tasks sync fine but contacts won't sync. How do you correct this?

    I had the same problem.  Here is what worked for me.  Open the mail app and delete your exchange account (Settings > Delete Account).  Then re-add your Exchange account.  After this my Exchange contacts showed up again. 

  • IPhone 6 recently stopped ringing and making text alert sounds since most recent upgrade to ios 8.1.1, has anyone experienced this, and if so, how did you correct?

    AFter recent upgrade to ios 8.1.1, my iphone 6 no longer makes text alert sounds and ring does not sound for incoming calls (except on car bluetooth).  has anyone experienced this, and if so, how did you correct?

    I had the same problem until tonight. Played with ring tones, do not disturb, volume, and everything else posted. What I found is that when you go to sounds/text tone, there are two types of tones in the scrolling menu. The top set of tones are for alert tones and the bottom set are ringtones. They are separated by a gray bar that states their purpose. Many of the tones are the same name. You need to set your text alert in the Ringtones and reminders, alarms, and such in alerts. The weird thing about this menu is when you go to sounds/ringtone the menu is reversed. Mine works in locked mode or unlocked now. I have an Iphone 6 8.1.2. My problem started after my latest OS upgrade. Hope this helps.

  • How do you approve/forward an Expense Report thats fallen into ERROR?

    How do you approve/forward an Expense Report thats fallen into Systems Administration Action status -"ERROR" (or Expense Status Code)?
    When I try logging into IE Audit manager responsibility half the buttons described in the doc:
    http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121oieig.pdf (Oracle® Internet Expenses Implementation and Administration Guide)
    ..are not visible?
    The approvers Cost (GL) Code is valid and the mileage expense lines have been created correctly. What else could it be?
    thanks.
    S

    Hello.
    For anybody thats interested please find below the reasons I've found so far for ER's dropping into said status..
    ERROR – Pending System Administrator Action
    If an employee cannot get their ER approved – check their Cost Code and/or that the approver named is actually an Approver. Also check the person who’s trying to Approve the ER has that particular GL Code in their Payables Signing Limits. Just add, then get ER creator to withdraw and resubmit it. Also check their actual ER lines table. Something must be up. And, of course, their expense Report via Auditor resp.
    J

  • How do you transfer purchased songs from itunes that you bought on your computer to your iphone? PLEASE HEP!!! :(

    how do you transfer purchased songs from itunes that you bought on your computer to your iphone? PLEASE HEP!!!

    Just follow the steps in this article:
    www.apple.com/support/kb/ht1351

  • How do you get your ring/text tones that were purchased back on your phone

    how do you get your ring/text tones that were purchased back on your phone

    Hey there oops31,
    Welcome to Apple Support Communities.
    It sounds like you want to know how to get tones that you’ve previously purchased on your iPhone 4s. The article linked below outlines the options for downloading past purchases and includes information about syncing tones from iTunes to your iOS device.
    Download past purchases - Apple Support
    Audiobooks, ringtones, and tones
    If you made a backup of these items on your Mac or PC, you can sync the items to your iOS device. You can't download these items again from iTunes in the Cloud.
    Cheers, 
    -Jason

  • When I try to do financial transactions I get a warning message "You have requested an encrypted page that contains some unencrypted information. Information that you see or enter on this page could easily be read by a third party." How much do I need to

    When I try to process financial information such as log onto my banking account or my paypal account, or pay for something online I get a warning message "You have requested an encrypted page that contains some unencrypted information. Information that you see or enter on this page could easily be read by a third party." I also never get a padlock to show that I am on a secure site. How much do I need to worry or what should I do?
    == URL of affected sites ==
    http://

    I would not trust that on a banking site. If it were just a forum, no problem, but anything unencrypted during banking is suspicious.

  • How do you make a photo in DW that changes automatically in a loop and needs  no visable buttons

    How do you make a photo in DW that changes automatically in a loop and needs  no visable buttons?

    I'm sorry to be so vague. I have recently found out that what I want 
    to do is put my images in a javascript image rotator. I have looked 
    this up on google and have now tried about 6 different codes. I try to 
    follow the insert directions but I must be doing something wrong. I 
    get the first photo linked up but can never make the picture change to 
    show the other two photos in the image folder.
    Can you direct me as to how this works in dw?
    Thank you so much for helping.
    Pam

  • How do you download albums to i tunes that are compilations and keep them together as a album

    how do you download albums to i tunes that are compilations and keep them together as an album i have several discs that have downloaded singley the i tunes is a mess

    Steve MacGuire aka turingtest2 - iTunes & iPod Hints & Tips - Grouping Tracks Into Albums - http://www.samsoft.org.uk/iTunes/grouping.asp (older post on Apple Discussions http://discussions.apple.com/message.jspa?messageID=9910895)
    Quick answer:  Select all the tracks on the album, File > get info, and either give them all a single "album artist", or check the "compilation" flag (as in https://discussions.apple.com/message/17670085).
    If these are from multiple-CD sets you may also need to enter the appropriate information in the disc number fields.

  • How do you fix itune error 7(windows error 1114)

    how do you fix itune error 7 (windows error 1114)

    Hey snowmanlahaie,
    Follow the steps in this link to resolve the issue:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    When you uninstall, the items you uninstall and the order in which you do so arearticularly important:
    Use the Control Panel to uninstall iTunes and related software components in the following order and then restart your computer:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order, or only uninstalling some of these components may have unintended affects.
    Let us know if following that article and uninstalling those components in that order helped the situation.
    Welcome to Apple Support Communities!
    Cheers,
    Delgadoh

Maybe you are looking for