Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to retrive the randomly number from the web page . ?
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
HI
I am using web application. In my page randomly number is generated dynamically . for ex. one page has a now number is 23 . after 4 hour or any time now number has changed to 23 to 50 along with some text . Now i want to catpure that number ? How can i do this ? Should i use the TExt area check point ? Or i should use a output value concept ? can we use a get Ro property . ?
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi njnirmal,

If you could provide the screenshot of that particular area, that would be easy and more clear.
Anyhow, you can use the GetROProperty (if the Object is identifying even the text(23 to 50) is changed dynamically).

Let me know if you need any more info.
Thanks,
SUpputuri
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
ok. But Number is displaying it doesn't have any object like edit box .In that case can we use getroproperty.?Or any other solutions ?
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hey,

the better way is to use the "GetCellData" method, then you can work without any issues.

If you need any further info, screenshot is appreciable.
Thanks,
SUpputuri
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
can we use virtual object . ? First create a edit box l than add in the object reposirtory we can go for the getroproperty.? am i correct ? Plese clear my doubt.
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi njnirmal,

If you want to use OR then you can add the object to the OR and use reg exp in the OR.
Please remember one thing, it is not advisable to use the Virtual Objects and ChecKPoints in real time scripting.

Feel free to ask me if you need any info.
Thanks,
SUpputuri
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
But OR is used when we have a object in the webpage , but in my scenario i don't have a real object so how can i use OR.Finally we have to go for the Virtual object because we can create here a object. Am i right ?
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi njnirmal,

First of all let me explain one scenario. Then you can implement the same scenario in your case.

'***********************
In your gmail account when you login you will have around 20 new mails then "Inbox(20)" will display. When you relogin next day the mail count may change to 35 then "Inbox(35)". Now I want to validate the "Inbox(X)", so what we can do is
1) Add this object to OR
2) Reg Exp the Value in the OR as "Inbox.*"
Then if you highlight from OR the Inbox(20) or Inbox(35) or Inbox(Anything) thing will highlight. So, now ur script will work without any issue though the number is changing dynamically.

'**************
The second method is as it is webbased application, i can use the getCellData method and get the value from the particular (Though the cell content is chaged from Inbox(20) to Inbox(35) the cell row number and col number will be constant).
'******************************

I think,you are also running with the similar case.

Hope you got my point, if else ping me back. NoProbs
Thanks,
SUpputuri
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
I got it .Your first scenerio is same as my scnerio . I will try to implement at my scenerio .
#10
Solved: 11 Years, 4 Months, 3 Weeks ago
This is a great question because there are different ways to handle it if I am not mistaken. I had trouble with the GetROProperty method. I ended up using descriptive programming to identify other properties of the dynamic object and QTP could find it. But the script performance went into the toilet. It took longer for the script to find the object to execute against than it would have taken manually to run the step. Not what you are looking for in automation. I would love t hear more about identfying dynamic objects in scripts. How do the GetROProperties, GetTOProperties and GetCellData methods differ? And how do they compare in terms of performance and aplicability?


Possibly Related Threads…
Thread Author Replies Views Last Post
  Find the number of occurrences of each number present in a matrix. Kalai 2 3,641 03-30-2015, 11:28 PM
Last Post: gauravarora6611
  Whether function can return number of links and their names in a web page kotaramamohana 3 4,329 12-07-2012, 08:40 PM
Last Post: elango87

Forum Jump:


Users browsing this thread: 7 Guest(s)