Contributions
Re: power shell scripts not running as expected using testcomplete script
Hi Nis, That's the issue, I have not getting any error message and power shell window just open and closed. Seems working but not getting expected results. I have somehow resolved the issue by adding CLR Bridge > browse GAC > added system.management.Automation and below script, now seems working!! var powerShellScript = "AppVersion.ps1"; // script is in the original message function getVersionOfInstalledAppUnderTest() { var currentDirectory = aqFileSystem.GetCurrentFolder(); psScriptPath = currentDirectory + "\\" + powerShellScript; var PowerShell = dotNET.System_Management_Automation.PowerShell.Create(); PowerShell.AddScript(currentDirectory + "\\" + powerShellScript); // invoke powershell to get the results var results = PowerShell.Invoke(); }1.4KViews1like0Commentspower shell scripts not running as expected using testcomplete script
Hello All, My requirement: 1. get version number of installed app under test before the test starts. am using a powershell script for this. Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion | Where-Object {$_.DisplayName -Like 'myapp*'} 2. There will be different versions to be installed so I would like to create a txt file from above script Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion | Where-Object {$_.DisplayName -Like 'myapp*'} > path\to\txt\myApp.txt I have power shell script to update a text file which is supposed run from testcomplete. Manually ps1 script works but not from script; my script looks like; Sys.OleObject("WScript.Shell").Run("PowerShell -File " + ".\myScript.ps1"); myScript.ps1 script is as follows; $MyReport= "version_info.txt" $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $Folder= Join-Path $scriptPath $MyReport # get items from system that has name myapp Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion | Where-Object {$_.DisplayName -Like 'myapp*'} > $Folder the powershell is working and successfully executed (it seems - no errors) but my text file created butnot updated. It is updated if run powershell script manually! why testcomplete cannot??? Any thoughts? SSolved1.4KViews0likes2CommentsRe: Microsoft Grid is not recognized after Project items moved / renamed to another project
Thank you for your reply, yes that was an issue with project 'Object Mapping' update. I have manually updated all mappings from old projects and grids are now back in action. can close this issue.1.2KViews0likes1CommentMicrosoft Grid is not recognized after Project items moved / renamed to another project
Grid control properties are not recognized by TestComplete after moving the project items to a newly created project. The tests are initiated and running for all butexcept for Microsoft Grid controls. I have already using 12.30 Test complete so assumed to be Microsoft controls are activated. The Gridobject is able to identified but failing to identify internal grid elements and properties. eg: grid object is identified but gridobj.wRowCount is returning 'The object with the specified attributes does not exist' error. The same test running fine in old project structure! Why object spy unable to find internal grid object when TC project is renamed / project items are moved? Any idea? Please let me know if any more details to be provided.Solved1.2KViews0likes3Comments