Score:0

Disable javascript in selenium test? (WebDriverTestBase)

in flag

Background

A website I work on has a progress bar that gets an initial value from Drupal, and is then updated to the "correct" value with javascript.

I am writing a test with WebDriverTestBase that should assert both the initial value (before js kicks in) and the updated value (after js run).

Problem

Unfortunately, the test only gives me the html with the updated values. So I cannot assert that the original values were different.

Question

Is there any way to disable javascript temporarily in the test? This way I could have one request to assert the source values and another request to assert the updated values.

Or alternatively, how could I access the source html?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.