def test_login_pc(self): selenium = None try: selenium = SeleniumUtil() # - ドライバーの初期化 selenium.build_pc_driver() page = LoginPagePC(selenium) page.open() print(selenium.driver().current_url) finally: if selenium: selenium.dispose_driver()
def handler(event, context): # return 'Hello from AWS Lambda using Python' + sys.version + '!' selenium = None try: selenium = SeleniumUtil() # - ドライバーの初期化 selenium.build_pc_driver() page = LoginPagePC(selenium) page.open() # print(selenium.driver().current_url) return selenium.driver().current_url finally: if selenium: selenium.dispose_driver()