Search⌘ K
AI Features

Advanced Techniques

Explore advanced methods in Selenium WebDriver using Node.js to handle scrolling for hidden elements, switch between browser tabs or windows, and store URLs for navigation control. Understand how to manage browser window sizes and script execution to improve test reliability and automation precision.

Scroll focus to control

Due to JavaScript, sometimes certain controls are not visible on the web page, thus making Selenium unable to click on them. If we try to click on such controls, they will throw an error like : “Element is not clickable at point (1180, 43)”. The solution to this problem is scrolling the browser view. We can do this by:

driver.manage().window().setSize(1024, 208); // make browser small
elem =
...