Prepare for your Next Interview
This is a discussion on Regular expression is not working. within the QTP forums, part of the Software Testing category; Hi guys Need help to solve one issue, I recorded one script 2 months back that time my session name was recorded “2008_0514_xyz”. Now today if I run ...
|
|||
|
Regular expression is not working.
Hi guys
Need help to solve one issue, I recorded one script 2 months back that time my session name was recorded “2008_0514_xyz”. Now today if I run my script then it throws the error stating “ how am I supposed to handle this issue? I tried to use regular expression (“.*2008_0514_xyz”) but still it is failing. my script is: Browser(Browser).page(page_1).linck(“2008_0514_xyz”).click Thanks in advance. Ema Last edited by emaraj : 07-21-2008 at 04:55 PM. |
| Sponsored Links |
|
|||
|
Quote:
Regards, Nawab |
|
|||
|
Re: Regular expression is not working.
Quote:
please help me |
|
|||
|
Please ensure that while you make a property as a regular expression, u select the checkbox(regular expression)...hence only in that case the string will parsed as a regular expression in QTP.
if nothing works then go for *.* ![]() E.g if there is a string value OSTD_45_T and here I am sure that 45 is a variant component....then the property of the control that holds the string value , suppose text.. text = OSTD_\d{2}_T else OSTD_\d{1,}_T else OSTD_*.*_T there is a checkbox which ask that u want to nake it a regular expression...just select that...and its done.. please revert in case there are issues. Regards, Nawab |
|
|||
|
Re: Regular expression is not working.
Hi Nawab
Thanks for your help but still my script is throwing error of mismatch property. I did check the check box. Below I am trying to explain my page. On my web page, first, I record year '2008' then date from the calendar box '06/18' then program area and hit on the 'Create' button so system generate the session name "2008_0618_xyz". But when I run this script after a month then it is throwing error because month is change. So when I run today then it create the session name '2008_0718_xyz' and match with the existing script which has session name”2008_0618_xyz”. Because month is changed so system throws the error of mismatch property. Script is: Browser (browser).page (page).link ("2008_0618_xyz").click I went to the object property of this line and entered the regular expression; I did check the check box and click 'yes'. I can see the blue color box near the session name on object property box, and then tried to run but still throwing error. I used the regular expression syntax whatever you said to use. Can you please help me? Thanks Ema |
|
|||
|
Quote:
Could you please provide the screenshot of Object Repository & the Control as in ur application. Regards, Nawab |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regular Expression in QTP | radhika_inala | QTP | 11 | 07-09-2008 02:37 PM |
| Regular expression | Euroneem | QTP | 11 | 06-19-2008 05:09 AM |
| regular expression | snigdha_123 | QTP | 1 | 12-17-2007 07:37 AM |
| Regular Expression | gouthami123 | QTP | 3 | 08-17-2007 11:32 AM |
| What is Regular Expression? | JobHelper | Testing Issues | 1 | 12-16-2006 07:17 AM |