Forum Discussion
mathare
13 years agoContributor
Thanks for the reply Julia.
1. I hadn't consdidered the fact that connected applications was effectively old functionality and that TC had matured to the point where it natively handled the cases that would previously only have been possible with connected applications. Useful to know. The examples you give of when it is a good idea to use connected applications make sense and has given me some confidence that I am going down the right route as I want to (eventually) get our developers writing test code and they will want to use the Visual Studio IDE where possible. It's also possible that the tests will need to access the applications classes etc so we'd need to use connected applications for that. Good stuff.
2. I had read the help system and had a quick play with the samples supplied along with TC and was still struggling to make headway but I don't know if that's down to my inexperience with TC, the application under test or a combination of these and other factors. I guess I was just after a bit of advice and guidance as to how to get started, general advice that could apply to any application. For example, I have found the Object Browser and Object Spy invaluable for identifying controls, examining their properties and so on. Maybe all that is needed is additional links in the existing connected applications help to point to the Object Browser help, or perhaps a brief 'getting started' section somewhere in the connected applications help section that covers things like getting information about the application under test with links to the Object Browser/Object Spy help. Or it could be that I missed these sort of help topics by jumping straight into the connected applications documentation and not spending sufficient time reading the more basic scripting help and/or watching tutorial videos in this area. Maybe I didn't spend enough time browsing the help system to see there were other topics that could have helped me (such as the reference topics outlining the support for Infragistics controls, for example)
3. Don't worry about the var type stuff, I have cracked it after numerous Google searches finally pointed me back to another post on this forum that gave me the information I needed. It was all to do with parentheses it seems. For example, I had code such as:
In this case I was trying to loop over all the nodes in licenseList and while the code seemed to compile and run as expected Visual Studio would underline "i < licenseList["Nodes"]["Count"]" in red and say "Cannot apply operand '<' to operands of type 'int' and 'AutomatedQA.script.var.VarDelegate'" and I wanted to get rid of this error. Another forum post helped me realise I need parentheses after "licenseList["Nodes]["Count"] i.e.:
I have now been able to get rid off all the Visual Studio errors I was encountering previously.
Overall I am rather more positive about the use of connected applications and the direction I am going with our automated testing. I was making frustratingly slow progress when I first posted but since then I have cracked a few of the problems and am now making steady progress. Phew!
Thanks again for your help
Mat
1. I hadn't consdidered the fact that connected applications was effectively old functionality and that TC had matured to the point where it natively handled the cases that would previously only have been possible with connected applications. Useful to know. The examples you give of when it is a good idea to use connected applications make sense and has given me some confidence that I am going down the right route as I want to (eventually) get our developers writing test code and they will want to use the Visual Studio IDE where possible. It's also possible that the tests will need to access the applications classes etc so we'd need to use connected applications for that. Good stuff.
2. I had read the help system and had a quick play with the samples supplied along with TC and was still struggling to make headway but I don't know if that's down to my inexperience with TC, the application under test or a combination of these and other factors. I guess I was just after a bit of advice and guidance as to how to get started, general advice that could apply to any application. For example, I have found the Object Browser and Object Spy invaluable for identifying controls, examining their properties and so on. Maybe all that is needed is additional links in the existing connected applications help to point to the Object Browser help, or perhaps a brief 'getting started' section somewhere in the connected applications help section that covers things like getting information about the application under test with links to the Object Browser/Object Spy help. Or it could be that I missed these sort of help topics by jumping straight into the connected applications documentation and not spending sufficient time reading the more basic scripting help and/or watching tutorial videos in this area. Maybe I didn't spend enough time browsing the help system to see there were other topics that could have helped me (such as the reference topics outlining the support for Infragistics controls, for example)
3. Don't worry about the var type stuff, I have cracked it after numerous Google searches finally pointed me back to another post on this forum that gave me the information I needed. It was all to do with parentheses it seems. For example, I had code such as:
var a = w["WinFormsObject"]("splitContainer1");
var b = a["WinFormsObject"]("SplitterPanel, "", 2);
var licenseList = b["WinFormsObject"]("list_modules_");
for (int i = 0; i < licenseList["Nodes"]["Count"]; i++)
{
...
}
In this case I was trying to loop over all the nodes in licenseList and while the code seemed to compile and run as expected Visual Studio would underline "i < licenseList["Nodes"]["Count"]" in red and say "Cannot apply operand '<' to operands of type 'int' and 'AutomatedQA.script.var.VarDelegate'" and I wanted to get rid of this error. Another forum post helped me realise I need parentheses after "licenseList["Nodes]["Count"] i.e.:
for (int i = 0; i < licenseList["Nodes"]["Count"](); i++)
{
...
}
I have now been able to get rid off all the Visual Studio errors I was encountering previously.
Overall I am rather more positive about the use of connected applications and the direction I am going with our automated testing. I was making frustratingly slow progress when I first posted but since then I have cracked a few of the problems and am now making steady progress. Phew!
Thanks again for your help
Mat
Related Content
- 3 years ago
- 10 years ago
Recent Discussions
- 21 hours ago