Home > Enterprise >  Redirect to particular url after login
Redirect to particular url after login

Time:09-30

I have created a script to login on JIRA using python selenium. Now I want to redirect to given url just after login on JIRA. How can I do that. Please provide sample code.

CodePudding user response:

If you are using

driver.get("http://www.jira.com/")

to login to JIRA and wants to redirect after login or any certain point of time.

you can have

driver.get("http://www.some other url.com/")

to load the some other url in same tab.

In case you'd like to open in new tab :

driver.get("http://www.some other url.com/")
# some other code in the same tab
driver.execute_script('window.open("http://newURL.com","_blank");')
driver.switch_to.window(driver.window_handles[1])
  • Related