From 2be982d477c5ffdeafea95ba14569a05da59cb0d Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 25 Nov 2018 09:42:13 +0100 Subject: behavior: Turn scroll JS code into class --- crocoite/behavior.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crocoite/behavior.py') diff --git a/crocoite/behavior.py b/crocoite/behavior.py index d5c82a0..5f66538 100644 --- a/crocoite/behavior.py +++ b/crocoite/behavior.py @@ -120,9 +120,10 @@ class JsOnload (Behavior): tab = self.loader.tab yield self.script result = await tab.Runtime.evaluate (expression=str (self.script)) + exception = result.get ('exceptionDetails', None) result = result['result'] assert result['type'] == 'object' - assert result.get ('subtype') != 'error' + assert result.get ('subtype') != 'error', exception self.context = result['objectId'] async def onstop (self): -- cgit v1.2.3