+9
-0
lines changedFilter options
+9
-0
lines changed Original file line number Diff line number Diff line change
@@ -14,10 +14,12 @@
14
14
# KIND, either express or implied. See the License for the
15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
+
import re
17
18
18
19
import pytest
19
20
20
21
from selenium.common.exceptions import JavascriptException
22
+
from selenium.webdriver.remote.script_key import ScriptKey
21
23
22
24
23
25
def test_should_allow_script_pinning(driver, pages):
@@ -67,3 +69,10 @@ def test_calling_unpinned_script_causes_error(driver, pages):
67
69
driver.unpin(cheese)
68
70
with pytest.raises(JavascriptException):
69
71
driver.execute_script(cheese)
72
+
73
+
74
+
def test_unpinning_non_existing_script_raises(driver, pages):
75
+
pages.load("simpleTest.html")
76
+
with pytest.raises(KeyError, match=re.escape(r"No script with key: ScriptKey(id=1) existed in {}")):
77
+
driver.unpin(ScriptKey(1))
78
+
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4