How to save User Defined Data in Global Data Sheet

Hi,
Can I save my user defined variable value in a Data Sheet ?

Dim textValue
textValue= Browser("Browser").Page("Pag1").WebEdit("WebEdit").GetROProperty("innertext")

I want to save textValue in a column in Global Data Sheet. Then I want to compare this column with another column.

Is that possible ?
Thanks
Sairam

Questions by sairam100   answers by sairam100

Showing Answers 1 - 18 of 18 Answers

If u want the values in the global sheet ,then just add this line
x=Browser("a").Page("a ").WebEdit("a").GetROProperty("value")
datatable.Value("name",global)=x
now ur value will be in the datatable.

  Was this answer useful?  Yes

Thank you Vignesh,
That was helpful. It worked for me. I have another question now. How can I compare two columns in Data Table ? I am trying to do something like this.

Global Data Table
Col 1      Col 2              
  xxxx      yyyyy
  www     ttttttt

If Col 1=Col2 then I want to generate a report saying "PASS" else "FAIL"

Thanks,
Sairam

  Was this answer useful?  Yes

ramugogurla

  • Dec 22nd, 2007
 

for ex dim a
a="ramugogurla"
datatable.value("Userdefined","dtglobalsheet")=a

value will come in run time datatable

or use environment variables

goto test settings environment userdefined and daclare u r own variables

and read that with myvalue=envirinment.value("ramu")

  Was this answer useful?  Yes

hi sai,
try this out
a=datatable.Value("name1",dtglobal)
b=datatable.Value("name2",dtglobal)
If  a=b Then
    reporter.ReportEvent micPass,"values r equal","step3"
        else
    reporter.ReportEvent micfail,"values r not equal","step3"
End If
 
ur result will be generated in the testresult window if u want in the test script during runtime itself use msgbox instead of reporterevent.

  Was this answer useful?  Yes

Hi sai
Try this
for entering data at run time in your datatable
c="somedata"
datatable("name2",dtglobal)=c

and compariing two column this will work
Dim A,B
A=datatable.Value("Columnname1",dtglobal)
B=datatable.Value("Columnname2",dtglobal)
If  A=B Then
    reporter.ReportEvent micPass,"values are equal","step3"
        else
    reporter.ReportEvent micfail,"values Are not equal","step3"
End If
 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions