UFT 14.x cannot execute ctrlC+ctrlV in IE - vbscript

I need a solution for this error
Before using UFT 14.x , I wrote my code on UFT 12 (on windows 7) for copy/paste function. (It worked 100%)
When I upgraded UFT to 14.x , that function respond with an error . The code and the image are the following :
Function WritingFast(strDataTable)
set objCB=createobject("Mercury.Clipboard")
objCD.Clear()
objCD.SetText (strDataTable)
Window("Internet Explorer").WinObject("Internet Explorer_Server").Type micCtrlDwn + "v" +micCtrlUp
objCB.GetText
End Function

The error says that WinObject("Internet Explorer_Server") is not unique, what are you trying to refer to by this object?
Please examine the description of the object in the object repository in order to see why the description there isn't enough to make it unique.
Alternatively you could take a step back and think about what you're trying to do, perhaps UFT's web support allows you to do it directly and not by trying to access the underlying Win32 objects.

Can't add a comment, rules, sorry. Gonna put has an answer but its more a tip.
If you don't have a duplicate, try capture the object again. See if UFT recognize that object exists or not at your repository.
At least you can see what he is capturing whit the upgrade and compare (if different).

Related

How to fix the footer and signature error when flashing partial images files?

I have a question, after I have whole built the AOSP source code, it generates couple image files, such as ramdisk.img, recovery.img, system.img, res-package.img,etc .
Right now, I am considering partial flashing my Android Box without formatting all of the system, for keeping some previous data remains.
Therefore, I just tried to use the command “adb sideload filename.img”, which filename might be ramdisk,recovery, etc.
Then, after I did so, the android system shows the message :
“footer is wrong”
“signature verification failed”
“Installation aborted”
There, what should I correct my command, to make the process correct?
as the figure shows enter image description here
And, my methods to do so is trying to refresh a new system feature, but keep the previous data, such as APPs, or user data, remain, does anybody have other good suggestions? Thank you in advance.
it depends on the flash type and file-system you are using, and it is not possible to partially flash in the partition, but you can update the partition.

How to debug Dojo in browser?

I'm currently (trying) to develop an app with Worklight Studio 5.0.6 and Dojo (Mobile) 1.8.3. I have a really hard time to to find a proper method for debugging. After waiting 5-10 minutes for the build an deploy-process on the server, an error usually looks like this in the Chrome debugger:
How am I supposed to track down this error in MY source? The whole stack trace consists entirely of Dojo code which generates an absolutely useless error message after 20 abstraction layers.
Seriously, how do you guys handle this in real life? What methods do you use for debugging Dojo-driven apps in the browser?
spyro
For dojo.parse errors, I find it useful to pause the Chrome debugger on all exceptions (the purple icon on your screenshot, should be blue). You usally get more details about the cause of the error, the name of the DOM node being parsed, etc. in the first exception being raised.
Rémi.
Debugging dojo based application should be the same as debugging any javascript application.
Usually I will follow these steps:
add console.log() somewhere in code: this is fast and most of time this is enough.
set breakpoint in debugger: if step 1 is not enough, you can base on error information to set breakpoint before error line, then step in or step out.
comment out recently changes: for some error which is hard to find the error line, for example, parse error in your case, the good way is comment out your recently changes one by one till back to your last working version. Or, return to your last working version, then add code back one by one.
Create a simple application to reproduce the error : if your application is very complicate and it is hard for you to follow above methods, you can try to create a new application which mimics your current application but with simple logics and try to reproduce the error.
Based on experience : Some errors, for example, extra ',' in the end of array which works at chrome and firefox, will report a nonsense error information at IE. Debug these kinds of errors is very difficult, you can base on your experience or do a google search.
Did you provide isDebug: true in your dojoConfig? Also, try to see if the same occurs in other browsers.
Update: I recently discovered that there are issues with Google Chrome and Dojo debugging and I think it has to do with the asynchronous loading of files. As you can see in the provided screenshot of #spyro, the ReferenceError object is blank (which you can notice because of the empty brackets {}). If you want to solve that, reopen the console of Google Chrome, (for example by tapping F12 twice). After reopening the ReferenceError should not be empty anymore and now you can expand that object by using the arrow next to it and get a more detailed message about what failed.
Usually what I do in situations like that is to place a breakpoint inside the error callback (line 3398 in your case) and then look into the error variable ("e").
I am not sure how familiar you are with the Web Inspector, but once you hit the breakpoint open the Web Inspector 'console' and check for the error properties "e.message" and "e.stack" (just type in "e.message " in the console).
Also, during development it is better to avoid Dojo optimization / minification, which greatly improve your debug-ability.
Bottom line is to try to place the breakpoint before the error is thrown.

populate combo box in installshield using vbscript

I am trying to populate a combo box in Installshield with a list of network adapter names on the local machine. I'm trying to use a vbscript custom action which I modified a bit from here : http://community.flexerasoftware.com/showthread.php?t=188130
MsiRecord.StringData(1) = "REGION" 'The Name of the Property
I seem to be getting an error on this line, and the installation crashes. Any suggestions?
Since your talking about updating windows installer tables using VBScript custom actions this really has everything to do with Windows Installer and not much to do with InstallShield per say.
I don't think that example posted on the forums was correct. I'd suggest reading the following page to get a better understand and take a look at the Combobox and ListBox sample projects provided.
Using Dual ListBoxes as Replacement for a Multi-Selection ListBox
Personally I suspect the problem with the sample you quoted is missing a Set statement when creating the record. As I recall, and it's been awhile since I touched VBScript, you have to use the Set command when creating an object. But I really advise against using VBScript in Custom Actions. C/C++, InstallScript and C# ( using DTF ) are far more robust solutions.

Cocoa, error when restoring document

When trying to restore a version of a document in my document based application, I get an error:
kCGErrorFailure: CGSDisplayID: App trying to enumerate [0 to CGSGetNumberOfDisplays()] instead of using CGSGetDisplayList(). Compensating...
kCGErrorFailure: Set a breakpoint # CGErrorBreakpoint() to catch errors as they are logged.
and the document remains unchanged. Also, when this happens, I get a message as soon as I start editing the document telling me:
The document [...] could not be autosaved. The file has been changed by another application.
I think these two problems may be related.
I don't know what to do or "check" because versions just works without any implementation needed; I'm actually confused, because Apple says that I just need to enable autosave in order to restore/revert using versions. Does anyone know what can be causing that error?
Thanks.
I've ran into all of your issues, causing me much pain.
I've gotten that error message regarding kCGErrorFailure... before as well when browsing versions. I've just ignored it mostly as it seems harmless to me. TextEdit seems to spit out this message as well. (Looks like an Apple bug)
For the "document remains unchanged", check here: Restoring from versions browser on OSX lion not working... ideas? (in short, your code for updating your document's UI is probably not being called for the document that is being reverted) (Looks undocumented to me)
For autosaving issues, check here: http://www.cocoabuilder.com/archive/cocoa/306217-how-to-implement-autosaving-browsing-versions-reverting-to-last-saved-in-lion.html (in short, use the file wrapper methods instead for reading and writing). (Looks like an Apple bug)
As well as returning YES to autosavesInPlace: your document needs to at least call updateChangeCount: passing NSChangeDone whenever it changes, so that it "knows" that there are changes to be autosaved.

Edit_SetInputMode, win32 API

I'm trying to change the input mode to a given window.
Searching i found the Edit_SetInputMode function, but when i run it, it always returns 0 ( fails) .
The MSDN documentation doesn't seem be to revealing... Any ideas anyone
Thank you
Dan
The correct terminology is probably focus: See SetFocus
Oh! I see where you are coming from. There is no such thing as Edit_SetInputMode - unless you are developing for embedded Windows that is.
Win32 "Desktop" applications get to use this set of Edit_xxx messages.

Resources