Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression to identify browser with different Title slowing script execution
12-02-2009, 04:55 AM
Post: #1
Regular expression to identify browser with different Title slowing script execution

Hi all,

I am new to this forum. I have to automate a web application in which user id becomed of browsers title bar, So its changing on each different login. If i am loging in with a user id say "PC-UK' it changes browser window title to "[ProjectConnect] :[PC-UK]-Windows Internet Explorer:" where projectconnect is my application name.

so to catter this issue and make my script executable for different user IDs I used regular expressions. for browser object my scripts local object repository below is the list of of properties for which i used regular expression.

1-title::"projectConnect*Windows Internet Explorer"
2-opentitle::"projectConnect*"
3-name::projectCentre* ( here i didn't entered double course does it metter for QTP)

Now if I execute my login test script after changing properties in above manner for different objects , script can be executed of browsers with different title bars than as mentioned above i.e. "[ProjectConnect] :[PC-UK]-Windows Internet Explorer:" . But it degrades perfomance and its taking a lot of time as compared to version of script nothaving regular expressions.Smile[/i]

please suggest is it normal or I am not using regular expressions properly.

second question is little silly but it is the way i lited RE for name property in 3rd point is it valid.

waiting for your welcome and advise you people can offer.
Find all posts by this user
Quote this message in a reply
12-02-2009, 04:58 PM
Post: #2
RE: Regular expression to identify browser with different Title slowing script execution
if the window title is like "[ProjectConnect] :[PC-UK]-Windows Internet Explorer:"
use [ProjectConnect].*

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
12-02-2009, 05:08 PM
Post: #3
RE: Regular expression to identify browser with different Title slowing script execution
Do the Regular expression for one property and then try for it. ( try with title or name property)
Find all posts by this user
Quote this message in a reply
12-09-2009, 03:56 AM
Post: #4
RE: Regular expression to identify browser with different Title slowing script execution
(12-02-2009 05:08 PM)v_selvam Wrote:  Do the Regular expression for one property and then try for it. ( try with title or name property)

Thanks for your replies
I have tried both resolutions as suggested first I cahnged my regular expression for all fields including URL,TITLE,NAMe some thing like below as per field requirement
"[ProjectConnect] :[PC-UK]-Windows Internet Explorer:"
In second case I removed regular expression at all from all fields except” title” but even than my script execution is slow.
Once script executioin is complete Test results shown as in attached screenshort. From my test results it seems I am on a wrong track as there are lot of warnings. These are description mismatch warnings you can see the attached image. These warnings are due regular expression or I need to run this script in maintenance mode.

I am getting confused what the benifit of regular expression then. Becuase one of the script where i didn’t used regular expression at all running on a different project with different URL and browser title bar absolutely fine.


Attached File(s) Image(s)
   
Find all posts by this user
Quote this message in a reply
12-09-2009, 10:22 AM
Post: #5
RE: Regular expression to identify browser with different Title slowing script execution
try the title as '.*Windows Internet Explorer.*'
also regularise your url too.

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
12-09-2009, 11:21 AM
Post: #6
RE: Regular expression to identify browser with different Title slowing script execution
Hi,

may i know what all properties you have used to identify your Browser object.
check in object identification Settings.


Thanks

~Nilesh
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Regular expression for this string falvi 2 238 04-30-2012 11:14 AM
Last Post: falvi
  regular expression rjkmr.aiht 0 146 04-27-2012 11:37 AM
Last Post: rjkmr.aiht
  Regular Expression samverma 3 348 03-31-2012 01:21 AM
Last Post: samverma
  Square Bracket Issue - Regular Expression kapsig431 2 281 03-29-2012 08:38 PM
Last Post: kapsig431
  Regular Expression for time in 24 hour format with out colon Pallavi 3 431 03-13-2012 11:29 AM
Last Post: sshukla12

Forum Jump:


User(s) browsing this thread: 1 Guest(s)