
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Unable to apply regular expression on one of the object property
Hi,
In my object repository, i have one object with 'field id' value as 155. Now i want to apply the regular expression on the last digit of the field id.
I'm doing something like 15.* but QTP would not apply this regular expression. I'm doing this by opening the OR manager and updating the object property value.
I have also tried to create to description object, using :-
Set TeScreenNum = Description.Create()
TeScreenNum("micclass").Value = "TeField"
TeScreenNum("field id").Value = "15" & ".*"
AND
Set TeScreenNum = Description.Create()
TeScreenNum("micclass").Value = "TeField"
TeScreenNum("field id").Value = "15.*"
But both of the above methods are not working. I'm getting general run error when scripts passes through the statement with above description object. i'm trying to 'text' property value from description object.
Please suggest. thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I just wanted to check doesn't it have any other properties to match and find.? if its possible could you please share the Object properties.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Have you tried the other DP method, something like:
Window("XYZ").TeScreenNum("field id:=15.*")
Mark Smith.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Try to apply regular express into entire value
Set TeScreenNum = Description.Create()
TeScreenNum("micclass").Value = "TeField"
TeScreenNum("field id").Value = ".*"
Thanks
Balaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi
Set TeScreenNum = Description.Create()
TeScreenNum("micclass").Value = "TeField"
TeScreenNum("field id").Value = ".*"
above solution will accept any value like 154 or 120 or 000, right ? if it so then, it is not a solution to my issue, as i want the third digit to be a anything, first two digits has to be '15'
Please suggest.
Regards,
Vineet

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Okay, As per my suggestions that you can better to handle in script level , I mean write a logic to get third value during run time.
1) To get entire values using GetRoProperty
2) Verify\Validated whatever the third digit using len function.
Thanks
Balaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Please reach me I can able to help you.
Thanks
Balaji
balajiqa11@gmail.com