Warning: fopen(/tmp/SghXTngBZPli-AxioZM.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139

Warning: unlink(/tmp/SghXTngBZPli-AxioZM.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
Site Loader
Auckland, New Zealand
In this post we will be talking about Javascript DOM and BOM and its usage behind the scenes in Selenium.

Javascript

  • JavaScriptis a high-level, dynamic, untyped, and interpreted programming language
  • Javascript is one of the three essential technologies of World Wide Web content production and majority of site has Javascript running in it.
  • Javascript runs without any plugins

Javascript and selenium

  • As we all know Selenium WebDriver behind the scenes converts the client code (language bindings) to its equivalent Javascript and injects in browsers like IE, Chrome, Firefox etc, JS is thus a key player in Selenium.
  • We can perform whatever operation selenium performs using Javascript itself.
  • To prove the concept, we need to understanding following Javascript libraries
    • Javascript HTML Document Object Model
    • Javascript Browser Object Model

E.G of Javascript Document Object Model

  • To get title of the document
    • Document.title
  • To get ready state of page (fully loaded)
    • Document.readyState
  • Finding an element with Id
    • Document.getElementById()

E.G of Javascript Browser Object Model

  • Opening a new window
    • window.Open
  • To go back of page
    • window.history.back()
  • To get the origin of the page
    • window.location
Here is the complete video of the above discussion Thanks for reading the post and watching the video!!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK  

Post Author: Karthik kk

One Reply to “Javascript and Selenium (Selenium titbits series)”

  1. Hello Thanks for all Videos.

    Please next time how to use the
    # chromium embedded framework cefsharp

    How to get Info from the debug to search for error please.

    Djelloul

Leave a Reply

Your email address will not be published. Required fields are marked *