Forum Discussion

tcarey's avatar
tcarey
Occasional Contributor
4 years ago
Solved

sending keystroke to Excel

I am trying to send keystroke to Excel Screen but seems like it is not working. Sys.Process("EXCEL").Window("XLMAIN", "*", 1).Window("XLDESK", "", 1).Window("EXCEL7", "*", 1).Keys("[F6][F6]")  I use...
  • Marsha_R's avatar
    Marsha_R
    4 years ago

    Okay.  There are a couple of things here.  

     

    Can I ask why you are testing Excel and Oracle?  Is the data upload something to do with your application?  The reason I ask is that most people are testing their own app and adding other apps into the mix can unnecessarily complicate things.  Can you give us a bigger overview of what you are trying to do?

     

    Second, if you are going to use Excel this way, then the best way to handle this is when the test fails.  When you get the error, and before TestComplete closes, you'll want to check and see if Excel is still open and close the file properly.