├── .editorconfig
├── .gitignore
├── .idea
├── codeStyleSettings.xml
├── modules.xml
├── selenium-ide.iml
├── typescript-compiler.xml
├── vcs.xml
├── watcherTasks.xml
└── workspace.xml
├── README.md
├── images
├── selenium-ide-logo-128.png
├── selenium-ide-logo-16.png
├── selenium-ide-logo-24.png
├── selenium-ide-logo-48.png
├── selenium-ide-logo-512.png
└── selenium-ide-logo.png
├── manifest.json
├── package-lock.json
├── package.json
├── src
├── actions
│ └── click.ts
├── by.ts
├── content
│ ├── action-recorder.ts
│ └── message-handler.ts
├── driver.ts
├── extension
│ ├── action-handler.ts
│ └── message-handler.ts
├── logger.ts
├── main
│ ├── background.ts
│ ├── content.ts
│ └── extension.ts
├── sass
│ └── main.sass
├── selenium-ide.ts
├── step.ts
├── test.ts
└── views
│ ├── ide.pug
│ ├── options.pug
│ └── popup.pug
├── tsconfig.json
├── vendor
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
└── superhero
│ └── superhero.min.css
├── webpack.config.js
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | # Unix-style newlines with a newline ending every file
4 | [*]
5 | end_of_line = lf
6 | insert_final_newline = true
7 |
8 | # Matches multiple files with brace expansion notation
9 | # Set default charset
10 | [*.{js,ts}]
11 | charset = utf-8
12 |
13 | # Indentation override for all JS under lib directory
14 | [src/**.ts]
15 | indent_style = space
16 | indent_size = 2
17 |
18 | # Matches the exact files either package.json or .travis.yml
19 | [{package.json,.travis.yml}]
20 | indent_style = space
21 | indent_size = 2
22 |
23 | [*.{html,htm,css,pug,jade}]
24 | indent_style = space
25 | indent_size = 2
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/intellij,typescript,node
3 |
4 | ### Intellij ###
5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7 |
8 | # User-specific stuff:
9 | .idea/**/workspace.xml
10 | .idea/**/tasks.xml
11 | .idea/dictionaries
12 |
13 | # Sensitive or high-churn files:
14 | .idea/**/dataSources/
15 | .idea/**/dataSources.ids
16 | .idea/**/dataSources.xml
17 | .idea/**/dataSources.local.xml
18 | .idea/**/sqlDataSources.xml
19 | .idea/**/dynamic.xml
20 | .idea/**/uiDesigner.xml
21 |
22 | # Gradle:
23 | .idea/**/gradle.xml
24 | .idea/**/libraries
25 |
26 | # CMake
27 | cmake-build-debug/
28 |
29 | # Mongo Explorer plugin:
30 | .idea/**/mongoSettings.xml
31 |
32 | ## File-based project format:
33 | *.iws
34 |
35 | ## Plugin-specific files:
36 |
37 | # IntelliJ
38 | /out/
39 |
40 | # mpeltonen/sbt-idea plugin
41 | .idea_modules/
42 |
43 | # JIRA plugin
44 | atlassian-ide-plugin.xml
45 |
46 | # Cursive Clojure plugin
47 | .idea/replstate.xml
48 |
49 | # Crashlytics plugin (for Android Studio and IntelliJ)
50 | com_crashlytics_export_strings.xml
51 | crashlytics.properties
52 | crashlytics-build.properties
53 | fabric.properties
54 |
55 | ### Intellij Patch ###
56 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
57 |
58 | # *.iml
59 | # modules.xml
60 | # .idea/misc.xml
61 | # *.ipr
62 |
63 | # Sonarlint plugin
64 | .idea/sonarlint
65 |
66 | ### Node ###
67 | # Logs
68 | logs
69 | *.log
70 | npm-debug.log*
71 | yarn-debug.log*
72 | yarn-error.log*
73 |
74 | # Runtime data
75 | pids
76 | *.pid
77 | *.seed
78 | *.pid.lock
79 |
80 | # Directory for instrumented libs generated by jscoverage/JSCover
81 | lib-cov
82 |
83 | # Coverage directory used by tools like istanbul
84 | coverage
85 |
86 | # nyc test coverage
87 | .nyc_output
88 |
89 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
90 | .grunt
91 |
92 | # Bower dependency directory (https://bower.io/)
93 | bower_components
94 |
95 | # node-waf configuration
96 | .lock-wscript
97 |
98 | # Compiled binary addons (http://nodejs.org/api/addons.html)
99 | build/Release
100 |
101 | # Dependency directories
102 | node_modules/
103 | jspm_packages/
104 |
105 | # Typescript v1 declaration files
106 | typings/
107 |
108 | # Optional npm cache directory
109 | .npm
110 |
111 | # Optional eslint cache
112 | .eslintcache
113 |
114 | # Optional REPL history
115 | .node_repl_history
116 |
117 | # Output of 'npm pack'
118 | *.tgz
119 |
120 | # Yarn Integrity file
121 | .yarn-integrity
122 |
123 | # dotenv environment variables file
124 | .env
125 |
126 |
127 | #!! ERROR: typescript is undefined. Use list command to see defined gitignore types !!#
128 |
129 | # End of https://www.gitignore.io/api/intellij,typescript,node
130 | dist
131 | src/**/*.js
132 | **/*.html
133 |
--------------------------------------------------------------------------------
/.idea/codeStyleSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/selenium-ide.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/typescript-compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/watcherTasks.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | false
77 |
78 | false
79 | false
80 | true
81 |
82 |
83 | true
84 | DEFINITION_ORDER
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 | 1502328115451
195 |
196 |
197 | 1502328115451
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Selenium IDE Rewrite
2 | Prototype Phase
3 |
4 | ## Usage
5 | > Installation:
6 | >> npm install
7 | >> npm install -g webpack
8 | >> webpack
9 | >
10 | > Chrome:
11 | >> Navigate to: chrome://extensions/
12 | >> Enable "Developer Mode" (Checkbox at top-right)
13 | >> Click the "Load unpacked extension..." button.
14 | >> Select the "dist" folder in this project that was generated by the "webpack" command above.
15 | >
16 | > Development:
17 | >> Do the steps listed above, except run webpack with the "--watch" switch:
18 | >> webpack --watch
19 | >> Any changes made will automatically be recompiled into the dist folder
20 |
21 | ## Simplified Roadmap
22 | - [X] Base WebExtension
23 | - [ ] User action recording
24 | - [ ] Import/exporting user actions as JSON
25 | - [ ] Display of recorded user actions
26 | - [ ] User action editing and validation
27 | - [ ] User action playback (browser only)
28 | - [ ] Export user actions as WebDriver tests (Ruby, Python, Java, C#)
29 |
--------------------------------------------------------------------------------
/images/selenium-ide-logo-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo-128.png
--------------------------------------------------------------------------------
/images/selenium-ide-logo-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo-16.png
--------------------------------------------------------------------------------
/images/selenium-ide-logo-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo-24.png
--------------------------------------------------------------------------------
/images/selenium-ide-logo-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo-48.png
--------------------------------------------------------------------------------
/images/selenium-ide-logo-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo-512.png
--------------------------------------------------------------------------------
/images/selenium-ide-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/images/selenium-ide-logo.png
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Selenium IDE",
3 | "short_name": "Selenium IDE",
4 | "description": "Selenium IDE",
5 | "author": "SeleniumHQ",
6 | "homepage_url": "https://seleniumhq.org",
7 | "version": "1.1",
8 | "manifest_version": 2,
9 | "browser_action": {
10 | "default_title": "Selenium IDE",
11 | "default_popup": "popup.html",
12 | "default_icon": {
13 | "512": "assets/images/selenium-ide-logo-512.png",
14 | "128": "assets/images/selenium-ide-logo-128.png",
15 | "48": "assets/images/selenium-ide-logo-48.png",
16 | "24": "assets/images/selenium-ide-logo-24.png",
17 | "16": "assets/images/selenium-ide-logo-16.png"
18 | }
19 | },
20 |
21 | "background": {
22 | "scripts": ["scripts/background.js"]
23 | },
24 |
25 | "options_ui": {
26 | "chrome_style": true,
27 | "page": "options.html"
28 | },
29 |
30 | "permissions": [
31 | "tabs",
32 | "storage",
33 | "contextMenus",
34 | "windows",
35 | ""
36 | ],
37 |
38 | "icons": {
39 | "512": "assets/images/selenium-ide-logo-512.png",
40 | "128": "assets/images/selenium-ide-logo-128.png",
41 | "48": "assets/images/selenium-ide-logo-48.png",
42 | "24": "assets/images/selenium-ide-logo-24.png",
43 | "16": "assets/images/selenium-ide-logo-16.png"
44 | },
45 |
46 | "content_scripts": [
47 | {
48 | "matches": [""],
49 | "css": [],
50 | "js": ["scripts/content.js"]
51 | }
52 | ]
53 | }
54 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "selenium-ide",
3 | "version": "0.0.1",
4 | "description": "Selenium IDE",
5 | "dependencies": {
6 | "babel-polyfill": "^6.23.0",
7 | "copy-webpack-plugin": "^4.0.1",
8 | "webpack": "^3.5.2"
9 | },
10 | "authors": [
11 | "Daniel Davison ",
12 | "Josh Mullins "
13 | ],
14 | "license": "Apache2",
15 | "bugs": {
16 | "url": "https://"
17 | },
18 | "devDependencies": {
19 | "@types/chrome": "^0.0.48",
20 | "@types/firefox": "^0.0.28",
21 | "babel": "^6.23.0",
22 | "babel-core": "^6.25.0",
23 | "babel-loader": "^7.1.1",
24 | "babel-preset-es2015": "^6.24.1",
25 | "babel-preset-es2016": "^6.24.1",
26 | "css-loader": "^0.28.4",
27 | "html-webpack-plugin": "^2.30.1",
28 | "node-sass": "^4.5.3",
29 | "pug": "^2.0.0-rc.3",
30 | "pug-loader": "^2.3.0",
31 | "sass-loader": "^6.0.6",
32 | "style-loader": "^0.18.2",
33 | "ts-loader": "^2.3.2",
34 | "typescript": "^2.4.2",
35 | "url-loader": "^0.5.9"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/actions/click.ts:
--------------------------------------------------------------------------------
1 | import { Step } from "../step";
2 |
3 | export class Click extends Step {
4 | executeAction(args): any {
5 | // execute click here
6 |
7 | return super.executeAction("click", args);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/by.ts:
--------------------------------------------------------------------------------
1 | export class By {
2 | static CSS_SELECTOR: Function = document.querySelector;
3 | static XPATH: Function = document.evaluate;
4 | static ID: Function = document.getElementById;
5 | }
6 |
--------------------------------------------------------------------------------
/src/content/action-recorder.ts:
--------------------------------------------------------------------------------
1 | import { Logger } from "../logger";
2 | import { MessageHandler } from "./message-handler";
3 |
4 | export class ActionRecorder {
5 | messageHandler: MessageHandler = new MessageHandler();
6 |
7 | clickHandler() {
8 | document.addEventListener('click', e => {
9 | console.log(e);
10 | let data = {
11 | type: e.type,
12 | elementId: e.srcElement.id,
13 | elementClasses: e.srcElement.classList
14 | };
15 | this.messageHandler.sendMessage(data);
16 | });
17 | }
18 |
19 | keydownHandler() {
20 | document.addEventListener('keydown', e => {
21 | console.log(e);
22 | });
23 | }
24 |
25 | constructor() {
26 | Logger.info((this).constructor.name, 'Action Recorder constructed');
27 | this.keydownHandler();
28 | this.clickHandler();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/content/message-handler.ts:
--------------------------------------------------------------------------------
1 | export class MessageHandler {
2 | browser: any;
3 | runtime: any;
4 |
5 | constructor() {
6 | if (chrome) {
7 | this.browser = chrome;
8 | }
9 |
10 | this.runtime = this.browser.runtime;
11 | }
12 |
13 | sendMessage(message: any) {
14 | // let request = JSON.stringify(message);
15 | // debugger;
16 | this.runtime.sendMessage(message, response => {
17 | //console.log(response);
18 | });
19 | console.log('Message sent');
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/driver.ts:
--------------------------------------------------------------------------------
1 | export class Driver {
2 | findElement(by: Function, selector: string) {
3 | return by.call(selector)
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/extension/action-handler.ts:
--------------------------------------------------------------------------------
1 | export class ActionHandler {
2 | constructor() {
3 |
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/extension/message-handler.ts:
--------------------------------------------------------------------------------
1 | export class MessageHandler {
2 | browser: any;
3 | runtime: any;
4 |
5 | constructor() {
6 | console.log('Extension MessageHandler loaded');
7 | if (chrome) {
8 | this.browser = chrome;
9 | }
10 |
11 | this.runtime = this.browser.runtime;
12 | // debugger;
13 | // chrome.runtime.onMessage.addListener(
14 | // function (request, sender, sendResponse) {
15 | // console.log(sender.tab ?
16 | // "from a content script:" + sender.tab.url :
17 | // "from the extension");
18 | // if (request.greeting == "hello")
19 | // sendResponse({ farewell: "goodbye" });
20 | // });
21 | this.runtime.onMessage.addListener((request, sender, sendResponse) => {
22 | // let data = JSON.parse(request);
23 | // debugger;
24 | console.log(request);
25 | });
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/logger.ts:
--------------------------------------------------------------------------------
1 | export class Logger {
2 | static DEBUG = 0;
3 | static INFO = 1;
4 | static WARN = 2;
5 | static ERROR = 3;
6 |
7 | static LEVELS = {
8 | 0: "[DEBUG]",
9 | 1: "[INFO] ",
10 | 2: "[WARN] ",
11 | 3: "[ERROR]"
12 | };
13 |
14 | level: number;
15 |
16 | constructor(level = 0) {
17 | this.level = level;
18 | }
19 |
20 | static debug(action: string, message): string {
21 | return this.log(this.DEBUG, action, message);
22 | }
23 |
24 | static info(action: string, message): string {
25 | return this.log(this.INFO, action, message);
26 | }
27 |
28 | static warn(action: string, message): string {
29 | return this.log(this.WARN, action, message);
30 | }
31 |
32 | static error(action: string, message): string {
33 | return this.log(this.ERROR, action, message);
34 | }
35 |
36 | private static log(level: number, action: string, message): string {
37 | let fullMessage = this.LEVELS[level] + ": [" + action + "] " + message;
38 | console.log(fullMessage);
39 | return fullMessage;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/background.ts:
--------------------------------------------------------------------------------
1 | import { Step } from "../step";
2 | import { By } from "../by";
3 | import { VERSION } from "../selenium-ide";
4 | import { ActionHandler } from '../extension/action-handler';
5 | import { MessageHandler } from "../extension/message-handler";
6 |
7 | console.log(VERSION);
8 | console.log('Extension Scripts loaded...');
9 | let messageHandler = new MessageHandler();
10 |
--------------------------------------------------------------------------------
/src/main/content.ts:
--------------------------------------------------------------------------------
1 | import { ActionRecorder } from "../content/action-recorder";
2 |
3 | console.log('Content Scripts loaded...');
4 | let actionRecorder = new ActionRecorder();
5 |
--------------------------------------------------------------------------------
/src/main/extension.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/src/main/extension.ts
--------------------------------------------------------------------------------
/src/sass/main.sass:
--------------------------------------------------------------------------------
1 | body#popup
2 | width: 500px
3 | height: 1000px
4 |
5 |
--------------------------------------------------------------------------------
/src/selenium-ide.ts:
--------------------------------------------------------------------------------
1 | export const VERSION = "0.0.1"
2 |
--------------------------------------------------------------------------------
/src/step.ts:
--------------------------------------------------------------------------------
1 | import { Logger } from "./logger";
2 | import { By } from "./by";
3 |
4 | export class Step {
5 | // logger: Logger;
6 | action: string;
7 | by: By;
8 | selector: string;
9 |
10 | constructor() {
11 | // this.logger = new Logger();
12 | }
13 |
14 | executeAction(action, args) {
15 | // log the action
16 | Logger.info(action, args);
17 | // execute the action
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test.ts:
--------------------------------------------------------------------------------
1 | import { Driver } from "./driver";
2 | import { Logger } from "./logger";
3 | import { Step } from "./step";
4 |
5 | export class Test {
6 | logger: Logger = new Logger();
7 | driver: Driver = new Driver();
8 | name: string;
9 | steps: Step[];
10 |
11 | run() {
12 | for (let step of this.steps) {
13 | let action = step.action;
14 | let by = step.by;
15 | let selector = step.selector;
16 |
17 | // new (args)
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/views/ide.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title Selenium IDE
5 | body#ide
6 | .container
7 | p Let's see if this works.
8 |
--------------------------------------------------------------------------------
/src/views/options.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html(lang="en")
3 | head
4 | title Selenium IDE
5 | body
6 | h1 Options Page
7 | p This is the options page yo
8 |
--------------------------------------------------------------------------------
/src/views/popup.pug:
--------------------------------------------------------------------------------
1 | html
2 | head
3 | title IDE
4 | body#popup
5 | .container
6 | h4 Selenium IDE
7 | hr/
8 |
9 | // loop through tests
10 | a(href="ide.html?test=1") Selenium Test
11 |
12 | nav#footer
13 | a(href="ide.html" target="_blank" class="btn btn-default") New Test
14 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "typeRoots": [
12 | "node_modules/@types"
13 | ],
14 | "lib": [
15 | "es2016",
16 | "dom"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/vendor/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/vendor/fonts/glyphicons-halflings-regular.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/vendor/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/vendor/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/vendor/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/vendor/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/vendor/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ddavison/selenium-ide/103bb475370ff8ac35a95570da64310fd4a580f9/vendor/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var CopyWebpackPlugin = require('copy-webpack-plugin');
3 | var HtmlWebpackPlugin = require('html-webpack-plugin');
4 |
5 | var babelOptions = {
6 | "presets": [
7 | [
8 | "es2015",
9 | {
10 | "modules": false
11 | }
12 | ],
13 | "es2016"
14 | ]
15 | };
16 |
17 | module.exports = {
18 | cache: true,
19 | entry: {
20 | extension: [
21 | './src/main/extension.ts',
22 | './vendor/superhero/superhero.min.css',
23 | './src/sass/main.sass'
24 | ],
25 | content: './src/main/content.ts',
26 | background: './src/main/background.ts',
27 | // vendor: [
28 | // // 'babel-polyfill',
29 | // ],
30 | },
31 | output: {
32 | path: path.resolve(__dirname, './dist'),
33 | filename: './scripts/[name].js',
34 | chunkFilename: '[chunkhash].js'
35 | },
36 | module: {
37 | rules: [{
38 | test: /\.ts(x?)$/,
39 | exclude: /node_modules/,
40 | use: [
41 | {
42 | loader: 'babel-loader',
43 | options: babelOptions
44 | },
45 | {
46 | loader: 'ts-loader'
47 | }
48 | ]
49 | },
50 | // {
51 | // test: /\.js$/,
52 | // exclude: /node_modules/,
53 | // use: [
54 | // {
55 | // loader: 'babel-loader',
56 | // options: babelOptions
57 | // }
58 | // ]
59 | // },
60 | {
61 | test: /\.pug$/,
62 | use: [
63 | {
64 | loader: 'pug-loader'
65 | }
66 | ]
67 | },
68 | {
69 | test: /\.css$/,
70 | use: ['style-loader', 'css-loader']
71 | },
72 | {
73 | test: /\.woff($|\?)|\.woff2($|\?)|\.ttf($|\?)|\.eot($|\?)|\.svg($|\?)/,
74 | loader: 'url-loader'
75 | },
76 | {
77 | test: /\.s(c|a)ss$/,
78 | use: [
79 | {
80 | loader: "style-loader" // creates style nodes from JS strings
81 | },
82 | {
83 | loader: "css-loader" // translates CSS into CommonJS
84 | },
85 | {
86 | loader: "sass-loader" // compiles Sass to CSS
87 | }
88 | ]
89 | }
90 | ]
91 | },
92 | plugins: [
93 | new CopyWebpackPlugin([
94 | { from: './manifest.json' },
95 | { from: './images/selenium-ide-logo-16.png', to: './assets/images/selenium-ide-logo-16.png' },
96 | { from: './images/selenium-ide-logo-24.png', to: './assets/images/selenium-ide-logo-24.png' },
97 | { from: './images/selenium-ide-logo-48.png', to: './assets/images/selenium-ide-logo-48.png' },
98 | { from: './images/selenium-ide-logo-128.png', to: './assets/images/selenium-ide-logo-128.png' },
99 | { from: './images/selenium-ide-logo-512.png', to: './assets/images/selenium-ide-logo-512.png' },
100 | ]),
101 | new HtmlWebpackPlugin({
102 | filename: './options.html',
103 | template: './src/views/options.pug',
104 | chunks: ['extension'],
105 | }),
106 | new HtmlWebpackPlugin({
107 | filename: './ide.html',
108 | template: './src/views/ide.pug',
109 | chunks: ['extension'],
110 | }),
111 | new HtmlWebpackPlugin({
112 | filename: './popup.html',
113 | template: './src/views/popup.pug',
114 | chunks: ['extension'],
115 | }),
116 | ],
117 | resolve: {
118 | extensions: ['.ts', '.js']
119 | }
120 | };
121 |
--------------------------------------------------------------------------------