UFT 11.51 - "Sequence contains more than one matching element" - save

I get this when I try to save my test either from QC (ALM connection) or locally.
"Sequence Contains more than one matching element"
I cannot Save As neither.
I use UFT 11.51 on XP.
Question is if anybody else had had this. And if there is any solution or workaround to it.
Thanks in advance,
Mateo

I'm using the Latest 12.02 version of UFT, I faced the same issue, one possible reason for this issue is the Action Name.
In my case I had used an action name as "ArticlePullQuote", called it from another action within the same test and try to save it, QTP throws error "Sequence Contains more than one matching element".
I changed the action name to "ArtPullQuote", and tried to save, it worked fine.
This might not be the solution for all, but give a try.

Related

Is there a way to order properties in a maven archetype? [duplicate]

Anybody knows is it possible to make substitution for default value of one requredProperty to another in archetype-metadata.xml ?
So, I try to do something like this:
<requiredProperty key="name"/>
<requiredProperty key="groupId">
<defaultValue>com.mycompamy.${name}</defaultValue>
</requiredProperty>
But when I start to generate project from artifact in interactive mode, maven asks me about groupId property first. But not for name as I expected.
Is it possible to change this behaviour?
Your problem is caused by required property loading order. Maven loads every custom required property in alphabetical order. You probably cant change it. But there are 2 ways which will solve your problem:
Renaming ur variables like this:
"0_name"
"1_groupId"
Now it will ask you about name firstly.
Use full maven command, passing only name parameter
mvn archetype:generate -DarchetypeGroupId=?? -DarchetypeArtifactId=?? -DgroupId=?? -DartifactId=?? -Dversion=?? -Dpackage=?? -Dname=??
Replace ?? with valid parameters
Hope it will helps you.
EDIT: now i see an asked time. Pretty offtopic but maybe it will help someone else

Why would ClientDataSet's Locate method fail to find a record that exists?

Every once in awhile, in ways that seem unpredictable to me, the code line
if not CDS.Locate('Name',aName,[]) then ...
resolves true (i.e., cannot find the string aName in the field 'Name') even though I know there is a record. I can close and reopen the application, load the exact same file, run the exact same command--repeat all my actions, in other words--and have everything work as expected the next time through. And the time after that. I can even just reopen the same file, and the code will run as expected ... I don't know what the issue is and, frankly, with something intermittent like this I don't even know where to look!
Any thoughts about where to start? ...
In delphi XE7 there is a serious problem TClientDataSet.Locate and it does not work with some fields look at QualityCentral [127703]

System.ArgumentException while updating Model from Database

Our Application is an MVC Application. We are using Entity Framework. When I am updating the model to add a table from the database. I am recieving an exception and it says
"An exception of type 'System.ArgumentException' occured while attempting to update from the database. The exception message is: 'An entry with the same key already exists'."
I am not able to figure out what is the problem. Can I have a solution to get over the problem.
I had it just as you did. You probably have two identical nodes: EntitySetMapping. You should remove one and everything will be ok.
I ran into this issue today. It means that you have two definitions of some sort with the same name. In my case, it was a duplicate EntitySetMapping. It happened as a result of me migrating some customizations from an old version of my model into a new version. I copied an EntitySetMapping with custom insert/delete/update mappings, but I didn't think to delete the mapping that had been previously auto-generated by the model designer.
Unfortunately, you won't know you have this problem until the next time you attempt to update from the database, meaning there's potential for this one to go undetected for some time.
In the future, when making significant changes to the model via the XML editor, I would recommend that you do a test database update just to make sure that all is well.
I recently ran into a similar issue with EF6 where this error was occurring and there was no duplicate key anywhere... That were visible in the edmx. What I had to do was right-click in the edmx and select Model Browser. In the Model Browser view and under Model/Entity Types, some lingering entities were there. For some reason, deleting all the entities in the edmx actually didn't do what you would think. Removing these lingering Entities in the Model Browser solved my problem. Hopefully this will solve some people's problems because this type of solution is easy to fix but hard to find.
Probably, there is another table with the same key exists. Can we see the code? Read more on this exception here.
Well, it seems I figured out a fix for my case.
Step 1: I deleted the table from the edmx model that contained the reference or what ever that was causing the error.
Step 2: I right clicked the designer and click "Update Model from Database" again and all was fixed.
FYI, the only way I knew which table to delete was because it was the last one modified since the "Update Model from Database" worked last.
Taken From Here
This is a more detailed answer based on Tazos333's answer.
Finding the actual duplicate is the hardest part. Using Powershell it can be done by:
Get-Content .\models.edmx | Group-Object | Where-Object { $_.Count -gt 1 } | Select -ExpandProperty Name
In order to get as few false positive results as possible, run this only for the <!-- C-S mapping content --> section (copy-pasted in other text file).
Besides scalar properties duplicates (quite normal, since tables might contain the same column names), the duplicate <EntitySetMapping Name="..."> will be very obvious.

The resource type 'XXXX.XXX' does not have a publicly visible static property named '_RequiredXXXX'

"'ErrorMessageResourceType' property specified was not found."
{"The resource type 'XXXX.XXXXXX' does not have a publicly visible static property named '_RequiredXXXX'."}
I'm getting this error when my Create.aspx view is called and steps over that line:
<%=Html.TextBoxFor(Function(model) model.NO_DEMND, New With {.class = "txtbox", .disabled = True})%>
<%=Html.ValidationMessageFor(Function(model) model.NO_DEMND)%>
The message is there in the Ressources file, I think the problem is deeper than that but i'm having a hard time finding it. It pops this error very early on the ASPX page. It's the first model component it goes thru, i tried removing this one and it's the same message for all the model.xxxx components. I guess it's an error somewhere in the linkage. The .EDMX is correct and I get no build errors, can anyone enlight me ?
Thanks alot
Tom.
Found the answer, turns out we had the same bug last year working on this project.
I'll add the answer for the sakes of knowledge and sO :-)
Right click on the affected Resources file to get the properties.
Set those values:
Build Action: Embedded Resource
Custom Tool: PublicResXFileCodeGenerator
Custom Tool Namespace: Resources
Hope it helps anyone in the near futur since it took me 4hrs to figure this out...
Tom.
Changing the build action property of my resource file to content resolved the error

How do I fix 'Setup project with custom action file not found' exception?

I am trying to create a setup project for a Windows Service. I've followed the directions at http://support.microsoft.com/kb/816169 to create the setup project with no trouble.
I want to be able to get a value during the installation in order to update the app.config with the user's desired settings. I added a Textboxes (A) dialog to retrieve the values. I set the Edit1Property property to "TIMETORUN", and in my Primary Output action's CustomActionData property I put in the following: /TimeToRun="[TIMETORUN]\". So far so good. Running the setup I can retrieve the TimeToRun value from the Context.Parameters collection without issue.
In order to locate the app.config I need to also pass in the value of the TARGETDIR Windows Installer Property to my custom action. This is where things begin to fall apart. In order to achieve this, the above CustomActionData must be altered like so: /TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\". Now when I run the setup I get the following error message:
Error 1001. Exception occurred while initializing the installation.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\SysWOW64\Files' or one of its dependencies. The system cannot
find the file specified.
If you google this problem you will inevitably find people having tremendous success by simply adding the trailing slash to the /TargetDir="[TARGETDIR]\" portion of the CustomActionData. This unfortunately does not solve my issue.
I tried so many different variations of the CustomActionData string and none of them worked. I tried logging to a file from my overridden Install method to determine where the breakage was, but no log file is created because it's not even getting that far. As the error indicates, the failure is during the Initialization step.
I have a hunch that it could be one of the dependencies that the setup project is trying to load. Perhaps somehow something is being appended to the CustomActionData string and isn't playing well with the TARGETDIR value (which contains spaces, i.e. "C:\Program Files\My Company\Project Name"). Again, this is another hunch that I cannot seem to confirm due to my inability to debug the setup process.
One further thing to mention, and yes it's another hunch, could this be an issue with Setup Projects on 64-bit version of Windows? I'm running Windows 7 Professional.
I'll provide names of the dependencies in case it helps:
Microsoft .NET Framework
Microsoft.SqlServer.DtsMsg.dll
Microsoft.SqlServer.DTSPipelineWrap.dll
Microsoft.SqlServer.DTSRuntimeWrap.dll
Microsoft.SQLServer.ManagedDTS.dll
Microsoft.SqlServer.msxml6_interop.dll
Microsoft.SqlServer.PipelineHost.dll
Microsoft.SqlServer.SqlTDiagM.dll
As you may glean from the dependencies, the Windows Service is scheduling a call to a DTSX package.
Sorry for the long rant. Thanks for any help you can provide.
The answer is so maddeningly simple. If the last argument in the CustomActionData is going to contain spaces and thus you have to surround it with quotes and a trailing slash, you must also have a space following the trailing slash, like this:
/TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\ "
The solution and explanation can be found here.
Had a similar issue. In my case, it was odd because my installer had ran successfully once, then I uninstalled my app via Add/Remove Programs successfully, did some coding (did NOT touch my CustomActionData string), and rebuilt my project and setup project. It was when I re-ran my MSI that I got this error.
The coding I had done was to bring in more values of more parameters I had been specifying in my CustomActionData string. That syntax for getting the parameter values (i.e. string filepath = Context.Paramenters["filepath"]), which was in my Installer class, was actually fine, but as I found out, the syntax of the later parameters I was now trying to get from my CustomActionData string had not been correct, from the very beginning. I had failed to add a second quote around one of those parameters, so nothing else could be obtained.
I was using the "Textboxes (A)" and "Textboxes (B)" windows in the User Interface section. A has 1 box, EDITA1, where I get the path to a file, and B has 2 boxes, EDITB1 and EDITB2, for some database parameters. My CustomActionData string looked like this:
/filepath="[EDITA1]" /host="[EDITB1] /port="[EDITB2]"
It should have been:
/filepath="[EDITA1]" /host="[EDITB1]" /port="[EDITB2]"
(closing quote on [EDITB1])

Resources