You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find more about them in [seleniumQuery Selectors wiki page.](https://github.com/seleniumQuery/seleniumQuery/wiki/seleniumQuery-Selectors)
105
104
105
+
###Flexible WebDriver builder system
106
+
107
+
How to setup the `WebDriver`? Simply use our builder. The driver will be instantiated only at the first use.
108
+
109
+
#####Firefox
110
+
111
+
```java
112
+
$.driver().useFirefox(); // Will set up firefox as driver
113
+
114
+
$.url("http://seleniumquery.github.io"); // the driver will be instantiated when this executes
115
+
```
116
+
117
+
#####Firefox driver with disabled JavaScript
118
+
119
+
Want `FirefoxDriver` without JavaScript? Just:
120
+
```java
121
+
$.driver().useFirefox().withoutJavaScript(); // when started, Firefox will have JS OFF
122
+
```
123
+
124
+
#####Chrome, InternetExplorer, PhantomJS drivers
125
+
126
+
All you have to do is download [their executables](https://github.com/seleniumQuery/seleniumQuery-demos/tree/master/src/main/resources) before. Setting them up in seleniumQuery is all too easy:
127
+
128
+
```java
129
+
// Using Chrome
130
+
$.driver().useChrome(); // will look for chromedriver(.exe) to you, including the classpath!
$.driver().useHtmlUnit().emulatingFirefox(); // could disable JS here as well
160
+
// And IE
161
+
$.driver().useHtmlUnit().emulatingInternetExplorer11(); // JS is disableable as well
162
+
$.driver().useHtmlUnit().emulatingInternetExplorer8(); // JS is disableable as well
163
+
$.driver().useHtmlUnit().emulatingInternetExplorer9(); // JS is disableable as well
164
+
$.driver().useHtmlUnit().emulatingInternetExplorer(); // will pick latest IE
165
+
````
166
+
167
+
####But there is more
168
+
169
+
Explore the auto-complete. There are additional options to every browser, such as `.withCapabilities(DesiredCapabilities)` or some specific, such as `.withProfile(FirefoxProfile)` or `.withOptions(ChromeOptions)`.
170
+
171
+
Finally, if you want to create the `WebDriver` yourself:
172
+
173
+
```java
174
+
WebDriver myDriver =...;
175
+
$.driver().use(myDriver);
176
+
```
177
+
178
+
106
179
###Waiting capabilities for improved Ajax testing
107
180
108
181
Other important feature is the leverage of `WebDriver`'s `FluentWait` capabilities **directly** in the element (no boilerplate code!) through the use of the `.waitUntil()` function:
@@ -126,23 +199,6 @@ And, that's right, the `.is()` function above is your old-time friend that takes
126
199
Check out what else `.waitUntil()` can do in the [seleniumQuery API wiki page](https://github.com/seleniumQuery/seleniumQuery/wiki/seleniumQuery-API).
127
200
128
201
129
-
<br>
130
-
131
-
###Alternate symbols
132
-
133
-
If the dollar symbol, `$`, gives you the yikes -- we know, it is used for internal class names --, it is important to notice that the `$` symbol in seleniumQuery is not a class name, but a `static` method (and field). Still, if you don't feel like using it, you can resort to `sQ()` or good ol' `jQuery()` and benefit from all the same goodies:
##seleniumQuery still is Selenium - with "just" a jQuery interface
@@ -168,6 +224,23 @@ Do as an user would: call `.click()`!
168
224
169
225
<br>
170
226
227
+
###Alternate symbols
228
+
229
+
If the dollar symbol, `$`, gives you the yikes -- we know, it is used for internal class names --, it is important to notice that the `$` symbol in seleniumQuery is not a class name, but a `static` method (and field). Still, if you don't feel like using it, you can resort to `sQ()` or good ol' `jQuery()` and benefit from all the same goodies:
0 commit comments