Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automate Spiratest mgt tool to add testcases
#1
Solved: 11 Years, 4 Months ago
I am required to add 5000+ testcases into Spiratest mangement tool.
All though I tried using the Excel sheet importer provided by Inflectra to import test cases into SpiraTest, it did not help much since the testcases need to be in the required format. After requesting the team members to enter the testcases into the tool, it was seen that hardly 100 testcases could be entered into the tool a day.

Now, I got the Idea to automate the Spira test, so that it would enter the testcase name, testcase steps and expected result and add a new testcase automatically.

I see the problem where the QTP fails to recognize the WebElement inside the Frame on the page to enter the tescase steps and expected result. The problem I am facing is when the mouse is already in the steps WebElement then the script recognizes the frame and the webelement inside it, else it fails to recognize the frame and the webelement inside.

The script runs first time and fails for the second loop onwards.
Please help...

Following is the code:
Code:
For i=4 to 6

datatable.SetCurrentRow(i)
tcname=datatable("testname",dtGlobalsheet)
row1=datatable("steps",dtGlobalsheet)
expres=datatable("expected",dtGlobalsheet)
blank=""
'msgbox(row1)
If Browser("name:=SpiraTest.*").Page("title:=SpiraTest.*").WebEdit("html id:=ctl00_cplMainContent_txtName").Exist Then
    msgbox("testcase name field exists")
    Reporter.ReportEvent micPass,"webedit Check", "webedit Exists"
    Browser("name:=SpiraTest.*").Page("title:=SpiraTest.*").WebEdit("html id:=ctl00_cplMainContent_txtName").Set blank
    wait 2
    Browser("name:=SpiraTest.*").Page("title:=SpiraTest.*").WebEdit("html id:=ctl00_cplMainContent_txtName").Set tcname
    wait 1
    Else
    Reporter.ReportEvent micFail,"webedit Check", "webedit does Not Exist"
End If
wait 1

browser("SpiraTest | Test Case").Page("SpiraTest | Test Case_2").Frame("Frame").WebElement("WebElement").FireEvent  "onmouseover"
browser("SpiraTest | Test Case").Page("SpiraTest | Test Case_2").Frame("Frame").WebElement("WebElement").FireEvent "onclick"
If browser("SpiraTest | Test Case").Page("SpiraTest | Test Case_2").Frame("Frame").WebElement("WebElement").Exist Then
wait 1
'msgbox("in here")
browser("SpiraTest | Test Case").Page("SpiraTest | Test Case_2").Frame("Frame").WebElement("WebElement").FireEvent "onclick"

hWnd = browser ("SpiraTest | Test Case").GetROProperty("hwnd")
'Down Arrow
Window("hwnd:=" & hWnd).Type micDown
Window("hwnd:=" & hWnd).Type micDown

wait 2
'msgbox(row1)
Set oEdit=browser("SpiraTest | Test Case").Page("SpiraTest | Test Case_2").Frame("Frame").WebElement("WebElement")
oEdit.object.innertext = row1
wait 3
else
msgbox("webelement not exist")

End If
'browser("SpiraTest | Test Case").Page("SpiraTest | Test Case").Image("Save and create a new").Click
wait 8
DataTable.SetNextRow
Next

'SaveAndNewIconSelected.gif
'If browser("SpiraTest | Test Case").Page("SpiraTest | Test Case").WebElement("WebElement_2").Exist Then
'
'browser("SpiraTest | Test Case").Page("SpiraTest | Test Case").WebElement("WebElement_2").Click
'wait 1
'Set oEdit1=browser("SpiraTest | Test Case").Page("SpiraTest | Test Case").WebElement("WebElement_2")
'oEdit1.object.innertext = expres
'else
'msgbox("webelement not exist")
'End If
Thanks,
Malini
Reply


Messages In This Thread
Automate Spiratest mgt tool to add testcases - by Malini - 08-30-2009, 12:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  tool srikanth.gnr 0 1,917 01-05-2012, 12:31 PM
Last Post: srikanth.gnr
  what add-ins should i add... Venkat 1 3,414 03-07-2011, 12:38 AM
Last Post: akbarsharifmd
  Which Add In manager i need to use to automate Eclipse based IDE? laxman_nsn 1 2,868 04-14-2010, 03:55 AM
Last Post: Tarik Sheth
  is webservice add in is different from web add in in qtp? hikpvasanth 1 3,325 10-07-2008, 07:23 PM
Last Post: niranjan
  Whether QTP can be used as the tool to automate Oracle Forms dowloaded via JRE/Jiniti Pradyuman 1 5,598 02-12-2008, 11:44 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 7 Guest(s)