Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regular expression
#12
Solved: 10 Years, 10 Months ago
Looks to me like this is getting too complicated. When you were doing the inline descriptive programming, you were not closing the strings and passing each property as a parameter:

Code:
Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("micclass:=Link,html tag:=a,text:=(Junk)$|Junk[\d\)\(]+").Click

Should be like this:

Code:
Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("micclass:=Link", "html tag:=a", "text:=(Junk)$|Junk[\d\)\(]+").Click

That being said, I think that the expression is not taking in to account what appears to be a space between the "Junk" and the number. I think the expression can be greatly simplified as well:

Code:
Browser("micclass:=Browser").Page("micclass:=Page").Link("html tag:=A", "text:=Junk( \(\d+\))?").Click

This expression says "click the link that has the text 'Junk' that may or may not be followed by the expression ' \(\d+\)' which says the text '<one space><one left parenthesis><one or more digits><one right parenthesis>'" Hope this helps!
Reply


Messages In This Thread
regular expression - by bangla123 - 10-06-2010, 12:30 AM
RE: regular expression - by jsknight1969 - 10-06-2010, 12:39 AM
RE: regular expression - by bangla123 - 10-06-2010, 12:46 AM
RE: regular expression - by jsknight1969 - 10-06-2010, 12:52 AM
RE: regular expression - by bangla123 - 10-06-2010, 12:52 AM
RE: regular expression - by jsknight1969 - 10-06-2010, 01:02 AM
RE: regular expression - by bangla123 - 10-06-2010, 01:06 AM
RE: regular expression - by jsknight1969 - 10-06-2010, 01:16 AM
RE: regular expression - by bangla123 - 10-06-2010, 01:26 AM
RE: regular expression - by Pallavii - 10-06-2010, 02:37 PM
RE: regular expression - by bangla123 - 10-06-2010, 10:34 PM
RE: regular expression - by cdesserich - 10-07-2010, 01:07 AM
RE: regular expression - by bangla123 - 10-07-2010, 08:52 PM
RE: regular expression - by jsknight1969 - 10-06-2010, 01:37 AM
RE: regular expression - by bangla123 - 10-06-2010, 02:08 AM
RE: regular expression - by cdesserich - 10-06-2010, 04:17 AM
RE: regular expression - by bangla123 - 10-06-2010, 09:13 PM
RE: regular expression - by cdesserich - 10-08-2010, 09:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,285 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,224 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,638 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,425 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,039 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)