I am trying to open a link in a new tab,that particular link is present in webpage. All the examples i have seen online seems to send the link directly in code and open that link in a new tab rather than getting it dynamically
Changerequest is the link i want open in a new tab and closing the new tab after doing some function
Sourcecontrol = driver.find_element_by_xpath('//li[@class="menu-item"]/a[contains(.,"Source Control")]')
Sourcecontrol.click();
Changerequest=driver.find_element_by_xpath( '//td[@class="confluenceTd"]/a[contains(.,"Change: ")]').send_keys(Keys.CONTROL + 't');
#testvalue = Changerequest.get_attribute('href')
driver.execute_script("window.open(Changerequest)")
When i use the short cut keys nothing seems to happen
send_keys(Keys.CONTROL + 't')