Hello I see there is way to handle redirect with ruby, but I was thinking aybe there is the way to do it with watir and then it will be same browser and coockie etc.
So if anyon can give me example how to follow url.
Let’s write exapmle:
This is link www. ly.by/ldkfjfjgii
in watir I already have destination link
and I could say
link = b.frame(:id => 'main_top_right').link(:index => 0).click
so is there a way to catch redirected url (final destination url), where it lands
example it could land on http:// somesite. com/jdkdjfk.
I want that final url after redirect with watir, I hope I was clear.
tnx
After clicking on any link, you can get the current URL of the page by using
in case clicking URL opening the link in new window/tab, you can use