1

I want to run my test in Firefox with JavaScript disabled, so I create a qualifier:

@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER })
@Qualifier
public @interface FirefoxWithoutJS
{

}

And I add the extension in the file arquillina.xml:

<extension qualifier="webdriver-firefoxwithoutjs">
    <property name="browser">firefox</property>
    <property name="firefox_binary">PathToThefirefox.exe</property>
    <!-- I guess I should add something here -->
</extension>

Surely, this configuration will not disable JavaScript, can you give me an example about how to do that?

I use:

  • Gradle 2.3
  • arquillian-junit-container 1.1.8
  • arquillian-drone 2.0.0
  • Selenium 2.45.0
ali
  • 31
  • 2

1 Answers1

2

To configure browser capabilities, you have to add them as properties in the extension's configuration.

Try adding the below property:

<property name="javascriptEnabled">false</property>

Apostolos Emmanouilidis
  • 7,179
  • 1
  • 24
  • 35