Method: Selenium::WebDriver::DriverExtensions::HasPinnedScripts#unpin_script
- Defined in:
- lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb
#unpin_script(script) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Unpins script making it undefined for the subsequent calls.
68 69 70 71 72 |
# File 'lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb', line 68 def unpin_script(script) devtools.runtime.evaluate(expression: script.remove) devtools.page.remove_script_to_evaluate_on_new_document(identifier: script.devtools_identifier) pinned_scripts.delete(script) end |