I need some coding help:I have a section of my application that looks up legal case numbers. So for example, I type 04TR000001 as my case number click GO and it will open the appropriate case.I have a data sheet with a parameter CASENUM and it has about 50 case numbers I now need to be able to verify the right case has opened. There is a bunch of case header information that comes up when a case is opened. It includes for example: --------------------------------------------------------------------LAKE IN THE HILLS VS. RUBONO, MICHAEL(04TR000001) Type:Traffic (TR) Filing Date: 02/28/2006 ---------------------------------------------------------------------I tried doing a simple text checkpoint comparision of CASENUM to the text inbetween the parenthesis. LAKE IN THE HILLS VS. However, that entire first line is not simply text, it is a complex web object called LAKE IN THE HILLS VS. Inside that web object is a property called INNERTEXT. This contains the entire first line of that text in the header I listed above.I need to:1) Retrieve the innertext from the object, getting only the text inside the parentheses.2) Compare that text to the current CASENUM.3) If the texts are equal, log the test as PASSED, if NOT log them as FAIL.I could use some assistance in all three.

Questions by waynehazle

Showing Answers 1 - 4 of 4 Answers

D.V.Narasimha Rao

  • Apr 4th, 2006
 

Hi ,

  For this to do , u have to use the "GETROproperty" of the link.sotre it in a string and compare it with the CASENUM.

Since i dont know the page name ,browser name , i will leave empty.

Code:

 Dim st

st=Browser(" ").page(" ").webelement("LAKE IN THE HILLS VS.").getRoProperty("innertext")

if (instr(st,CASENUM) > 0) then

msgbox "PASSED"

else

msgbox "Failed"

end if

here I gave msgbox to display them, u convert them according to ur application.

     Onething important here is the getROproperty

Any doubts , feel free to ask

Thanks

D.V.Narasimha Rao

  Was this answer useful?  Yes

i want to get the data in brackets,the brackets may be anywhere in line

suppose the line is

India is (developing) country

i want only "developing"

how to get this used by GetRO property

  Was this answer useful?  Yes

D.V.Narasimha Rao

  • Apr 5th, 2006
 

Hi Murthy,

For getting the string in the brackets, there are several logics...one of them  is

code:

  Dim st,st1,len,i,j

st="India is (developing) country"

l1=instr(1,st,"(")
l2=instr(1,st,")")
st2=mid(st,l1+1,l2-l1-1)

this will geive me the string within the brackets.

This will work for any application

if any doubts plz ask me

Thanks

D.V.Narasimha Rao

  Was this answer useful?  Yes

ABC

  • Nov 14th, 2006
 

I have a Query. Pls Help me

I have a combo Box "Country". Before this combo box the label exist by the name Country : * combo box

Now where '*' exist I want to generate a message.

I dont want to use Text CheckPoint

  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