Trying to set a time out in python much like you would in ruby.
I have a link that when I click it opens a popup but I can not access it because it causes the script to freeze until I kill it. I have been trying for months to access this popup to no joy in ruby watir-webdriver.
I am trying to timeout the call to popup and then access the popup window.
@timeout(3)
try:
b.execute_script("javascript:openMdlWindow('InvestmentDetailOptions.aspx?IDAssetType=','620','600');if(window.document.RetValue == '2'){window.parent.LoadinIframe('InvestmentDetail.aspx?FromMenu=N&IDAssetType=','Investment Details > Full View','false');}")
except Exception, e:
print 'timeout!'
any help will be dearly appreciated.
Just try this: