Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular Expression Syntax
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
I want to use regular expression for the link because on click of every link,it navigates to new web page.
The code is written below:
Code:
Browser(“Browser”).Page(“Page”).Link(“Next”).Click

Here ‘Next’ is present on every web page and instead of using Data Table, i want to use regular expression in the Object Repository.
Please tell me which syntax of the regular expression i used in this.

Thanks in advance…….

Regards,
Anu
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
look for the similar properties of link 'next' in the pages and use descriptive programming.
e.g
Code:
Browser().Page().Link("text:=Next","html tag:=A")

does this help?

Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Saket,
I used the below code
Code:
Browser().Page().Link("text:=Next","html tag:=A")

That is :
Code:
Browser("Browser").Page("Page").Link("text:=Next","html tag:=A").Click
When i run this then it shows the error message which i have attached with it.

Regards,
Anu


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
I just gave an example, you will need to look for the properties which will uniquely identify your object.

Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Sanket,
Thanks for reply........
Could you please tell me how to uniquely identify an object because i am new in this.

Regards,
Anu
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Saket,

Please assist me so that i can proceed further.

Thanks in advance....................

Regards,
Anu
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
HI anu ,

By Using Object Spy u can get the object properties & values of it.
U can use any values of it ,for example like same as above Browser().Page().Link("text:=Next","html tag:=A","hwnd:=xxx",xxx).
U can additional properties of it by using. then surely it wil identity.try it once by adding additional properties
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Saket,

As Next is present on every page but it has different url or href corresponding to that page.

Regards,
Anu
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
try regularising the url of page. It should be something like
Code:
http.*://.*/pages/Lookup\.aspx\?.*

Reply
#10
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Saket,

this is the url "http://210.212.176.226/ins_byname.php?page=2" for Next and which increments as we click the Next.
Here page increments such as page=3,page=4.The rest of the url remains same.
Could you please tell what will be the regular expression for the same.

Regards,
Anu
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,519 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,397 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,861 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,644 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,143 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)