I want to redirect from mail to browser. Requirement is like, I have a mail that contains one link, after clicking on that link it will redirect to the browser. To achieve this I configured my base url on mail server for example microsoft.outlook.com
. So when I click a link it will go to http://abcd.com/registration/success
url. So how can I configure to switching the base url like this. Thanks for any suggestions.
Asked
Active
Viewed 85 times
0

Suraj
- 297
- 3
- 18
-
Can you be more concise? You need to change base url or you need to navigate to base url? – lauda Aug 11 '16 at 14:56
-
I want to navigate from microsoft.outlook.com to http://abcd.com/registration/success after clicking on a link in the mail – Suraj Aug 12 '16 at 04:01
1 Answers
0
For navigating to another page you can use:
I am on "abcd.com/registration/success"
or from a context:
$this->getSession()->visit('abcd.com/registration/success');
If the link is dynamic you could create a step for this: get the link and navigate to it.
You could name the step: 'I confirm the registration' or use any snippet that is helpful to you.
For getting the link you could use a method to get the href attribute, find the element and use getAttribute('href') and save it to a variable. After this you could use the visit method to visit that link.

lauda
- 4,153
- 2
- 14
- 28
-
Thank you for your suggestion. Actually in my case the navigating url is dynamic one. I cant able to give each time that particular url to visit. So is there any generic method to do this. Mail contains a link which will leads to success of the registration. So that link is always different for different users. – Suraj Aug 17 '16 at 05:06