Thanks a lot for your time. still having problem. pls see attached if that helps you why i am getting the error.
|
regular expression
|
|
10-06-2010, 04:17 AM
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\)\(]+").ClickShould be like this: Code: Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("micclass:=Link", "html tag:=a", "text:=(Junk)$|Junk[\d\)\(]+").ClickThat 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+\))?").ClickThis 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!
10-06-2010, 02:37 PM
When using multiple descriptors, try the following:
Code: Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("micclass:=Link","html tag:=a","text:=(Junk)$|Junk[\d\)\(]+").ClickNote, the quotes are given between each attribute. Also, in object identification, add other properties name, innertext, outertext, visible as well. Delete the object inbox() added in object repository, and again add it to OR with these properties. Make sure you check 'regular expression' checkbox in the properties of the object in OR. Try with the value Inbox ([0-9].*) in Value configuration options of the property in OR, and do not set '\' backslash. Set Regular expression checkbox. With all this set, try with Code: Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("innertext:=Inbox ([0-9].*)").Click
Thanks .
I am still having same problem. Pls see attached. I had: Code: Browser("micclass:=Browser").Page("micclass:=Page").Frame("micclass:=Frame").Link("micclass:=Link","html tag:=a","text:=(Junk)$|Junk[\d\)\(]+").ClickOne thing I noticed that Inbox/Junk both has a html tag = A. I am doing it in hotmail as i said. If you can do the same in hotmail, i dont know why i cant do it. Thanks. one improvement. i added one more property. Code: Browser("micclass:=Browser").Page("micclass:=Page").Link("micclass:=Link","html tag:=A","abs_y:=267", "text:=Junk( \(\d+\))?").Clickthis code works, if Junk folder has any number(ex: Junk(1), Junk(2)), it clicks. But if Junk folder has no number, no parenthesis, then it gives me error. ex: Junk Pls help. thx.
10-06-2010, 10:34 PM
When Junk folder was empty, using object spy, i found Junk text value was : Junk ()
When Junk folder had one email, using object spy, i found Junk text value was : Junk (1) Just letting you know. Thanks.
10-07-2010, 01:07 AM
(This post was last modified: 10-07-2010, 01:08 AM by cdesserich.)
Ah ha! That's the trick then! I thought that when there was nothing in the folder, the parenthesis and digits would both be gone. try:
Code: Browser("micclass:=Browser").Page("micclass:=Page").Link("html tag:=A", "text:=Junk \(\d*\)").ClickThis says: click the link that has the text "Junk (" that may have zero to many digits followed by the text ")". Also, when doing inline descriptive programming, you do not have to call out the micclass property since it is implied by the fact that you are calling the Link() function. We only use it for Browser and Page as dummy properties so that we get back the only Browser with any Page on it (i.e no identification properties).
10-07-2010, 08:52 PM
You are awesome. Now it works. Many thanks.
When you have a chance, can you explain me the following expressions? "text:=(Junk)$|Junk[\d\)\(]+") //what the dollar and plus sign for? "text:=Junk( \(\d+\))?") //here what is the question mark meaning? Also, do you have any messenger/email so i can ask you more questions?
10-08-2010, 09:35 PM
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Need Any digit in xpath path using Regular expression | Priyam | 1 | 4,064 |
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,804 |
04-09-2015, 01:56 AM Last Post: sarahq49 |
|
| Regular expression and script optimisation | Padmavathy | 1 | 4,395 |
03-30-2015, 11:46 AM Last Post: supputuri |
|
| Regular expression in descriptive programming | testernc | 1 | 17,093 |
12-08-2014, 06:38 PM Last Post: anshika.agarwal |
|
| need a regular expression. | anu05446 | 0 | 3,456 |
11-26-2014, 03:00 PM Last Post: anu05446 |
|
Users browsing this thread: 1 Guest(s)

