Search the Community
Showing results for tags 'TDApiOle80'.
-
I'm trying to create an interface to allow some user to create a new Defect in Quality Center 11. I have the script now to the point where it will log in to the specific project in Quality Center but when I try to create a new defect I get a "The requested action with this object has failed" All of the scripts i found online say to use BugFactory.AddItem(Nothing) I have tried "Nothing", "", Chr(0), also just omitting the () all with the same error. Anybody have any ideas on this? $ObjName = RegRead("HKEY_CLASSES_ROOT\TDApiOle80.TDConnection\CurVer", "") if $ObjName = "" Then MsgBox(270384,"QC Addin not found","Please visit this page to download the Quality Center Add-In" & @CRLF & @CRLF & "http://Bla-Bla-Bla.com:8080/qcbin/TDConnectivity_index.html") Exit EndIf $HostName = "http://bla-bla-bla:8080/qcbin/" $Domain = "Proj_Domain" $Project = "Test" $UserID = "test-ID" $PassWd = "Password1" $objOTAapi = ObjCreate($ObjName) $objOTAapi.InitConnectionEx($HostName) $objOTAapi.Login($UserID,$PassWd) $LoginVal = $objOTAapi.LoggedIn If $LoginVal <> True Then MsgBox(0, "", "Login Failed") Exit EndIf $objOTAapi.Connect($Domain, $Project) $ProjectVal = $objOTAapi.Connected if $ProjectVal <> True Then MsgBox(0, "", "Failed to connect to " & $Domain & "\" & $Project) $objOTAapi.Logout EndIf ;~ Get bug factory $bfact = $objOTAapi.BugFactory ;These 2 lines are just to get the count of fields to ensure properly connected to bugfactory ;~ $FieldList = $bfact.Fields ;~ MsgBox(0, "", $FieldList.Count) ;~ Add defects $Summary = "This is a test from the External script" $Status = "New" $AssignTo = "admin" $mybug = $bfact.AddItem(Chr(0)) ;<==This line is being a PITA! $mybug.Summary = $Summary $mybug.Status = $Status $mybug.AssignedTo = $AssignTo $mybug.Post $objOTAapi.DisconnectProject() $objOTAapi.ReleaseConnection() It's been over a year since I have done an AutoIT script so sorry if I messed up something simple. Thanks, Mike ps. the new forum setup looks cool
- 5 replies
-
- Quality CenterQC
- OTA
-
(and 1 more)
Tagged with: