Selenium - Why minified browser gives element not found error whereas max does not

I'm working with Selenium 2.0 and as far as I thought Selenium doesn't really care about the size of your browser. But when I click the dropdown menu it cannot find all the items that are not displayed in the browser, whereas at its maximum value it can.

I personally thought it was crawling through the script network, but my observations prove that I am wrong.

Comments?

+3


source to share


1 answer


Your assumptions about the inner workings of Selenium may have been correct for Selenium RC, which was the JavaScript-based technology used in Selenium 1.0. However, being entirely JavaScript-based, this meant that it was limited to the JavaScript browser sandbox, which excluded some browser action.

Selenium 2.0 introduced Selenium WebDriver which is a different paradigm for web automation. WebDriver tries to match user experience and actions as accurately as possible. Since user experience modeling dictates certain design and technology choices for interacting with elements, it probably won't work if the browser is minimized, since the user cannot interact with the page when the browser window is minimized.



BTW, I would be surprised to find items related to WebDriver code execution. Interacting with the found items, for example trying to click on them or send keystrokes to them, I would totally expect to fail.

+4


source







All Articles