elif xml is not None and xml.tag == 'prelogin-response' and None not in (xml.find('saml-auth-method'), xml.find('saml-request')):
import webbrowser
sam = xml.find('saml-auth-method').text
elif xml is not None and xml.tag == 'prelogin-response' and None not in (xml.find('saml-auth-method'), xml.find('saml-request')):
import webbrowser
sam = xml.find('saml-auth-method').text