topological-nodered-wdio 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,92 @@
1
+ <script type="text/javascript">
2
+ RED.nodes.registerType('execute-script', {
3
+ category: 'Webdriver IO',
4
+ color: '#a6bbcf',
5
+ defaults: {
6
+ name: { value: '' },
7
+ locateUsing: { value: 'xpath' },
8
+ locateValue: { value: '' },
9
+ action: { value: 'sync' },
10
+ script: { value: '' }
11
+ },
12
+ inputs: 1,
13
+ outputs: 1,
14
+ icon: 'white-globe.png',
15
+ label: function() {
16
+ return this.name || 'execute script'
17
+ }
18
+ })
19
+ </script>
20
+
21
+ <script type="text/x-red" data-template-name="execute-script">
22
+ <div class="form-row">
23
+ <label for="node-input-locateUsing"><i class="fa fa-tasks"></i> Locate Method</label>
24
+ <select type="text" id="node-input-locateUsing" style="width:70%;">
25
+ <option value="id">id</option>
26
+ <option value="name">name</option>
27
+ <option value="css selector">CSS selector</option>
28
+ <option value="link text">Link text</option>
29
+ <option value="partial link text">Partial link text</option>
30
+ <option value="tag name">Tag name</option>
31
+ <option value="xpath" selected>XPath</option>
32
+ </select>
33
+ </div>
34
+ <div class="form-row">
35
+ <label for="node-input-locateValue"><i class="fa fa-tasks"></i> Selector</label>
36
+ <input id="node-input-locateValue" type="text">
37
+ </div>
38
+ <div class="form-row">
39
+ <label for="node-input-action"><i class="fa fa-tasks"></i> Action</label>
40
+ <select type="text" id="node-input-action" style="width:70%;">
41
+ <option value="sync">Sync</option>
42
+ <option value="aSync">Async</option>
43
+ </select>
44
+ </div>
45
+ <div class="form-row">
46
+ <label for="node-input-script"><i class="fa fa-tasks"></i> Script</label>
47
+ <input id="node-input-script" type="text" placeholder="javascript in string">
48
+ </div>
49
+ <div class="form-row">
50
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
51
+ <input id="node-input-name" type="text">
52
+ </div>
53
+ </script>
54
+
55
+ <script type="text/x-red" data-help-name="execute-script">
56
+ <h3>Execute javascript commands on a target web element.</h3>
57
+ <h3>Inputs</h3>
58
+ <dl class="message-properties">
59
+
60
+ <dt><code>mgs.locateUsing</code>: <span class="property-type">string</span></dt>
61
+ <dd>specifies the type of web element identifier:
62
+ <ul>
63
+ <li>id</li>
64
+ <li>name</li>
65
+ <li>CSS selector</li>
66
+ <li>Link text</li>
67
+ <li>Partial link text</li>
68
+ <li>Tag name</li>
69
+ <li>XPath</li>
70
+ </ul>
71
+ <br>
72
+ </dd>
73
+ <dt><code>msg.locateValue</code><span class="property-type">string</span></dt>
74
+ <dd>value passed to the web element identifier (Locate Method)<br></dd>
75
+
76
+ <dt><code>msg.script</code><span class="property-type">string</span></dt>
77
+ <dd>This is the script that would run in the context frame; the selected web element(Selector) would be passed as an argument.</dd>
78
+ </dl>
79
+
80
+ <h3>Details</h3>
81
+ <p><b>Locate Method</b> specifies the method used to target the web element. This option can be selected manually from the Properties panel OR it can be received from <code>mgs.locateUsing</code><br></p>
82
+ <p><b>Selector</b> value used by the Locate Method to target the web element. This option can be selected manually from the Properties panel OR it can be received from <code>mgs.locateValue</code><br></p>
83
+ <p><b>Action</b>
84
+ <ul>
85
+ <li>Sync: executes a JavaScript function in the context of the current browsing context. Selector is passed in as an argument. <code>browser.executeScript(script, args)</code></li>
86
+ <li>Async: inject a snippet of JavaScript into the page for asynchronous execution in the context of the currently selected frame. Selector is passed in as argument/ <code>browser.executeAsyncScript(script, args)</code></li>
87
+ </ul>
88
+ </p>
89
+ <p><b>Script</b> The script that would would run in the context browser<br></p>
90
+ </script>
91
+
92
+
@@ -0,0 +1,39 @@
1
+ const common = require('./wdio-common')
2
+
3
+ module.exports = function(RED) {
4
+ function executeScript(config) {
5
+ RED.nodes.createNode(this, config)
6
+ const node = this
7
+ common.clearStatus(node)
8
+
9
+ node.on('input', async (msg) => {
10
+ try {
11
+ let locateUsing = config.locateUsing || msg.locateUsing
12
+ let locateValue = config.locateValue || msg.locateValue
13
+
14
+ let browser = await common.getBrowser(node.context())
15
+ let element = await common.getElement(
16
+ browser,
17
+ locateUsing,
18
+ locateValue
19
+ )
20
+
21
+ let script = config.script || msg.script
22
+
23
+ if (config.action === 'sync') {
24
+ node.log = `Execute synchronous Javascript: "${script}"${element?` By passing the webelement identified using ${locateUsing}: "${locateValue}"`:''}.`
25
+ await browser.executeScript(script, Array.from(element))
26
+ } else if (config.action === 'aSync') {
27
+ node.log = `Execute the asynchronous Javascript: "${script}"${element?` By passing the webelement identified using ${locateUsing}: "${locateValue}"`:''}.`
28
+ await browser.executeAsyncScript(script, Array.from(element))
29
+ }
30
+ await common.log(node)
31
+ common.successStatus(node)
32
+ node.send(msg)
33
+ } catch (e) {
34
+ common.handleError(e, node, msg)
35
+ }
36
+ })
37
+ }
38
+ RED.nodes.registerType('execute-script', executeScript)
39
+ }
@@ -0,0 +1,123 @@
1
+ <script type="text/javascript">
2
+ function setExplicitAction() {
3
+ let action = $('#node-input-action').val()
4
+ $('#actionTime').show()
5
+ $('#actionReverse').show()
6
+ $('#actionError').show()
7
+ if (action === 'until') {
8
+ $('#actionTime').hide()
9
+ $('#actionReverse').hide()
10
+ $('#actionError').hide()
11
+ }
12
+ }
13
+
14
+ RED.nodes.registerType('explicit-wait', {
15
+ category: 'Webdriver IO',
16
+ color: '#a6bbcf',
17
+ defaults: {
18
+ name: { value: '' },
19
+ locateUsing: { value: 'xpath' },
20
+ locateValue: { value: '' },
21
+ action: { value: '' },
22
+ time: { value: '' },
23
+ reverse: { value: 'false' },
24
+ error: { value: '' }
25
+ },
26
+ inputs: 1,
27
+ outputs: 1,
28
+ icon: 'white-globe.png',
29
+ label: function() {
30
+ return this.name || 'explicit wait'
31
+ },
32
+ oneditprepare: function() {
33
+ setExplicitAction()
34
+ }
35
+ })
36
+ </script>
37
+
38
+ <script type="text/x-red" data-template-name="explicit-wait">
39
+ <div class="form-row">
40
+ <label for="node-input-locateUsing"><i class="fa fa-tasks"></i> Locate Method</label>
41
+ <select type="text" id="node-input-locateUsing" style="width:70%;">
42
+ <option value="id">id</option>
43
+ <option value="name">name</option>
44
+ <option value="className">Class Name</option>
45
+ <option value="selector">Jquery Selector</option>
46
+ </select>
47
+ </div>
48
+ <div class="form-row">
49
+ <label for="node-input-locateValue"><i class="fa fa-tasks"></i> Selector</label>
50
+ <input id="node-input-locateValue" type="text">
51
+ </div>
52
+ <div class="form-row">
53
+ <label for="node-input-action"><i class="fa fa-tasks"></i> Action</label>
54
+ <select type="text" id="node-input-action" style="width:70%;" onchange="setExplicitAction()">
55
+ <option value="displayed">Wait for Displayed</option>
56
+ <option value="enabled">Wait for Enabled</option>
57
+ <option value="exists">Wait for Exist</option>
58
+ <option value="until">Wait Until</option>
59
+ </select>
60
+ </div>
61
+ <div class="form-row" id="actionTime" >
62
+ <label for="node-input-time"><i class="fa fa-tasks"></i> Time to Wait</label>
63
+ <input id="node-input-time" type="text" placeholder="in ms">
64
+ </div>
65
+ <div class="form-row" id="actionReverse" >
66
+ <label for="node-input-reverse"><i class="fa fa-tasks"></i> Reverse</label>
67
+ <select type="text" id="node-input-reverse" style="width:70%;">
68
+ <option value="false">false</option>
69
+ <option value="true">true</option>
70
+ </select>
71
+ </div>
72
+ <div class="form-row" id="actionError" >
73
+ <label for="node-input-error"><i class="fa fa-tasks"></i> Error Message</label>
74
+ <input id="node-input-error" type="text" placeholder="error message">
75
+ </div>
76
+ <div class="form-row">
77
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
78
+ <input id="node-input-name" type="text">
79
+ </div>
80
+ </script>
81
+
82
+ <script type="text/x-red" data-help-name="explicit-wait">
83
+ <h3>The Set Timeouts command sets timeout durations associated with the current session.</h3>
84
+ <h3>Inputs</h3>
85
+ <dl class="message-properties">
86
+ <dt><code>mgs.locateUsing</code>: <span class="property-type">string</span></dt>
87
+ <dd>specifies the type of web element identifier:
88
+ <ul>
89
+ <li>id</li>
90
+ <li>name</li>
91
+ <li>CSS selector</li>
92
+ <li>Link text</li>
93
+ <li>Partial link text</li>
94
+ <li>Tag name</li>
95
+ <li>XPath</li>
96
+ </ul>
97
+ <br>
98
+ </dd>
99
+ <dt><code>msg.locateValue</code><span class="property-type">string</span></dt>
100
+ <dd>value passed to the web element identifier (Locate Method)<br></dd>
101
+
102
+ <dt><code>msg.reverse</code><span class="property-type">boolean</span></dt>
103
+ <dd>If set to true, webdriver will wait for the <i>opposite</i> of the action selected<br></dd>
104
+ </dl>
105
+
106
+ <h3>Details</h3>
107
+ <p><b>Locate Method</b> specifies the method used to target the web element. This option can be selected manually from the Properties panel OR it can be received from <code>mgs.locateUsing</code><br></p>
108
+ <p><b>Selector</b> value used by the Locate Method to target the web element. This option can be selected manually from the Properties panel OR it can be received from <code>mgs.locateValue</code><br></p>
109
+ <p><b>Action</b> to perform on the pop-up alert/window:
110
+ <ul>
111
+ <li>Wait for Displayed</li>
112
+ <li>Wait for Enabled</li>
113
+ <li>Wait for Exist</li>
114
+ <li>Wait Until</li>
115
+ </ul>
116
+ </p>
117
+ <p><b>Time to Wait</b> Set time to wait in milliseconds. <br></p>
118
+ <p><b>Reverse</b> If set to true, webdriver will wait for the <i>opposite</i> of the action selected. <br></p>
119
+ <p><b>Error Message</b> If an error exists this error message overrides the default error message. <br></p>
120
+
121
+
122
+
123
+ </script>
@@ -0,0 +1,53 @@
1
+ const common = require('./wdio-common')
2
+
3
+ module.exports = function(RED) {
4
+ function explicitWait(config) {
5
+ RED.nodes.createNode(this, config)
6
+ const node = this
7
+ common.clearStatus(node)
8
+
9
+ node.on('input', async (msg) => {
10
+ try {
11
+ let locateUsing = config.locateUsing || msg.locateUsing
12
+ let locateValue = config.locateValue || msg.locateValue
13
+
14
+ let browser = await common.getBrowser(node.context())
15
+ let element = await common.getElement(
16
+ browser,
17
+ locateUsing,
18
+ locateValue
19
+ )
20
+
21
+ let time = config.time || msg.time
22
+ let reverse = config.reverse || msg.reverse
23
+ let error = config.error || msg.error
24
+
25
+ let boolReverse = reverse === 'false' ? false : true
26
+
27
+ if (config.action === 'displayed') {
28
+ node.log = `Waiting for the element to be displayed for ${time}, identified using ${locateUsing}: "${locateValue}".`
29
+ await element.waitForDisplayed(time, boolReverse, error)
30
+ } else if (config.action === 'enabled') {
31
+ node.log = `Waiting for the element to be enabled for ${time}, identified using ${locateUsing}: "${locateValue}".`
32
+ await element.waitForEnabled(time, boolReverse, error)
33
+ } else if (config.action === 'exists') {
34
+ node.log = `Waiting for the element to be exists for ${time}, identified using ${locateUsing}: "${locateValue}".`
35
+ await element.waitForExist(time, boolReverse, error)
36
+ } else if (config.action === 'until') {
37
+ await element.waitUntil()
38
+ }
39
+
40
+ if (error) {
41
+ common.handleError(error, node, msg)
42
+ } else {
43
+ await common.log(node)
44
+ common.successStatus(node)
45
+ node.send(msg)
46
+ }
47
+ } catch (e) {
48
+ common.handleError(e, node, msg)
49
+ }
50
+ })
51
+ }
52
+ RED.nodes.registerType('explicit-wait', explicitWait)
53
+ }
@@ -0,0 +1,67 @@
1
+ <script type="text/javascript">
2
+ function setFrameAction() {
3
+ let action = $('#node-input-action').val()
4
+ $('#actionFrame').hide()
5
+ if (action === 'frame') {
6
+ $('#actionFrame').show()
7
+ }
8
+ }
9
+
10
+ RED.nodes.registerType('frame-action', {
11
+ category: 'Webdriver IO',
12
+ color: '#a6bbcf',
13
+ defaults: {
14
+ name: { value: '' },
15
+ action: { value: 'frame' },
16
+ frame: { value: '' }
17
+ },
18
+ inputs: 1,
19
+ outputs: 1,
20
+ icon: 'white-globe.png',
21
+ label: function() {
22
+ return this.name || 'frame action'
23
+ },
24
+ oneditprepare: function() {
25
+ setFrameAction()
26
+ }
27
+ })
28
+ </script>
29
+
30
+ <script type="text/x-red" data-template-name="frame-action">
31
+ <div class="form-row">
32
+ <label for="node-input-action"><i class="fa fa-tasks"></i> Action</label>
33
+ <select type="text" id="node-input-action" style="width:70%;" onchange="setFrameAction()">
34
+ <option value="frame">Switch to Frame</option>
35
+ <option value="parentFrame">Switch to Parent Frame</option>
36
+ </select>
37
+ </div>
38
+ <div class="form-row" id="actionFrame">
39
+ <label for="node-input-frame"><i class="fa fa-tasks"></i> Frame Name</label>
40
+ <input id="node-input-frame" type="text" >
41
+ </div>
42
+ <div class="form-row">
43
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
44
+ <input id="node-input-name" type="text">
45
+ </div>
46
+ </script>
47
+
48
+ <script type="text/x-red" data-help-name="frame-action">
49
+ <h3>Select the current top-level browsing context or a child/parent browsing context of the current browsing context to use as the current browsing context for subsequent commands</h3>
50
+ <h3>Details</h3>
51
+ <dl class="message-properties">
52
+ <dt>Action: <span class="property-type">select</span></dt>
53
+ <dd>
54
+ <ul>
55
+ <li><b>Switch to Frame</b></li>
56
+ <ul>
57
+ <li>The Switch To Frame command is used to select the current top-level browsing context or a child browsing context of the current browsing context to use as the current browsing context for subsequent commands.</li>
58
+ </ul>
59
+ <li><b>Switch to Parent Frame</b></li>
60
+ <ul>
61
+ <li>The Switch to Parent Frame command sets the current browsing context for future commands to the parent of the current browsing context.</li>
62
+ </ul>
63
+ </ul>
64
+ </dd>
65
+ </dl>
66
+ </script>
67
+
@@ -0,0 +1,37 @@
1
+ const common = require('./wdio-common')
2
+
3
+ module.exports = function(RED) {
4
+ function frameAction(config) {
5
+ RED.nodes.createNode(this, config)
6
+ const node = this
7
+ common.clearStatus(node)
8
+
9
+ node.on('input', async (msg) => {
10
+ try {
11
+ let browser = await common.getBrowser(node.context())
12
+
13
+ let frame = config.frame || msg.value
14
+
15
+ if (config.action === 'frame') {
16
+ let checkNumber = Number(frame)
17
+ if (!Number.isNaN(checkNumber)) {
18
+ node.log = `Switch to frame/iFrame, identified using index: "${frame}".`
19
+ await browser.switchToFrame(parseInt(frame))
20
+ } else {
21
+ node.log = `Switch to frame/iFrame, identified using selector: "${frame}".`
22
+ //Need to fix this to find element
23
+ await browser.switchToFrame(frame)
24
+ }
25
+ } else if (config.action === 'parentFrame') {
26
+ await browser.switchToParentFrame()
27
+ }
28
+ await common.log(node)
29
+ common.successStatus(node)
30
+ node.send(msg)
31
+ } catch (e) {
32
+ common.handleError(e, node, msg)
33
+ }
34
+ })
35
+ }
36
+ RED.nodes.registerType('frame-action', frameAction)
37
+ }
@@ -0,0 +1,85 @@
1
+ <script type="text/javascript">
2
+ function setWaitAction() {
3
+ let action = $('#node-input-action').val()
4
+ $('#actionImplicit').show()
5
+ $('#actionPageLoad').show()
6
+ $('#actionScript').show()
7
+ if (action === 'get') {
8
+ $('#actionImplicit').hide()
9
+ $('#actionPageLoad').hide()
10
+ $('#actionScript').hide()
11
+ }
12
+ }
13
+
14
+ RED.nodes.registerType('implicit-wait-config', {
15
+ category: 'Webdriver IO',
16
+ color: '#a6bbcf',
17
+ defaults: {
18
+ name: { value: '' },
19
+ implicit: { value: '' },
20
+ pageload: { value: '' },
21
+ script: { value: '' },
22
+ action: { value: '' }
23
+ },
24
+ inputs: 1,
25
+ outputs: 1,
26
+ icon: 'white-globe.png',
27
+ label: function() {
28
+ return this.name || 'implicit-wait config'
29
+ },
30
+ oneditprepare: function() {
31
+ setWaitAction()
32
+ }
33
+ })
34
+ </script>
35
+
36
+ <script type="text/x-red" data-template-name="implicit-wait-config">
37
+
38
+ <div class="form-row">
39
+ <label for="node-input-action"><i class="fa fa-tasks"></i> Action</label>
40
+ <select type="text" id="node-input-action" style="width:70%;" onchange="setWaitAction()">
41
+ <option value="set">Set Timeouts</option>
42
+ <option value="get">Get Timeouts</option>
43
+ </select>
44
+ </div>
45
+ <div class="form-row" id="actionImplicit" >
46
+ <label for="node-input-implicit"><i class="fa fa-tasks"></i> Implicit Wait</label>
47
+ <input id="node-input-implicit" type="text" placeholder="in ms">
48
+ </div>
49
+ <div class="form-row" id="actionPageLoad" >
50
+ <label for="node-input-pageload"><i class="fa fa-tasks"></i> Page Load Timeout</label>
51
+ <input id="node-input-pageload" type="text" placeholder="in ms">
52
+ </div>
53
+ <div class="form-row" id="actionScript" >
54
+ <label for="node-input-script"><i class="fa fa-tasks"></i> Script Timeout</label>
55
+ <input id="node-input-script" type="text" placeholder="in ms">
56
+ </div>
57
+ <div class="form-row">
58
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
59
+ <input id="node-input-name" type="text">
60
+ </div>
61
+ </script>
62
+
63
+ <script type="text/x-red" data-help-name="implicit-wait-config">
64
+ <h3>The Set Timeouts command sets timeout durations associated with the current session.</h3>
65
+ <h3>Inputs</h3>
66
+ <dl class="message-properties">
67
+ <dt><code>mgs.implicit</code>: <span class="property-type">int</span></dt>
68
+ <dd>Integer in ms for session implicit wait timeout</dd>
69
+ <dt><code>msg.pageload</code><span class="property-type">int</span></dt>
70
+ <dd>Integer in ms for session page load timeout<br></dd>
71
+ <dt><code>msg.script</code><span class="property-type">int</span></dt>
72
+ <dd>Integer in ms for session script timeout</dd>
73
+ </dl>
74
+
75
+ <h3>Details</h3>
76
+ <p><b>Action</b> specifies the action to be performed on the target web element. Actions includes:
77
+ <ul>
78
+ <li><b>Get Timeouts</b>: The Get Timeouts command gets timeout durations associated with the current session.</li>
79
+ <li><b>Set Timeouts</b>: The Set Timeouts command sets timeout durations associated with the current session. The timeouts that can be controlled are listed below.</li>
80
+ </ul>
81
+
82
+ <p><b>Implicit Wait</b> Integer in ms for session implicit wait timeout.<br></p>
83
+ <p><b>Page Load Timeout</b> Integer in ms for session page load timeout.<br></p>
84
+ <p><b>Script Timeout</b> Integer in ms for session script timeout.<br></p>
85
+ </script>
@@ -0,0 +1,40 @@
1
+ const common = require('./wdio-common')
2
+
3
+ module.exports = function(RED) {
4
+ function waitConfig(config) {
5
+ RED.nodes.createNode(this, config)
6
+ this.implicit = config.implicit
7
+ this.pageload = config.pageload
8
+ this.script = config.script
9
+ const node = this
10
+ common.clearStatus(node)
11
+
12
+ node.on('input', async (msg) => {
13
+ try {
14
+ let browser = await common.getBrowser(node.context())
15
+
16
+ let implicit = parseInt(node.implicit || msg.implicit)
17
+ let pageLoad = parseInt(node.pageload || msg.pageload)
18
+ let script = parseInt(node.script || msg.script)
19
+
20
+ if (config.action === 'set') {
21
+ var timeouts = {
22
+ implicit,
23
+ pageLoad,
24
+ script
25
+ }
26
+ node.log = `Setup the implicit wait timeouts as "${timeouts}".`
27
+ await browser.setTimeout(timeouts)
28
+ } else if (config.action === 'get') {
29
+ msg.payload = await browser.getTimeouts()
30
+ }
31
+ await common.log(node)
32
+ common.successStatus(node)
33
+ node.send(msg)
34
+ } catch (e) {
35
+ common.handleError(e, node, msg)
36
+ }
37
+ })
38
+ }
39
+ RED.nodes.registerType('implicit-wait-config', waitConfig)
40
+ }
@@ -0,0 +1,96 @@
1
+ <script type="text/javascript">
2
+ function setValue() {
3
+ return $('#node-input-killSession').val()
4
+ }
5
+ //https://9bbb33aa-ac83-4087-9829-a264f90452fe@chrome.browserless.io:443/webdriver
6
+ function setProvider() {
7
+ if ($('#node-input-webdriverProvider').val() === 'browserless.io') {
8
+ $('#node-input-webdriverUri').attr(
9
+ 'placeholder',
10
+ 'https://<apikey>:chrome.browserless.io:443/webdriver'
11
+ )
12
+ $('#node-input-webdriverBrowser').val('chrome')
13
+ $('#row-browser').hide()
14
+ } else if ($('#node-input-webdriverProvider').val() === 'local') {
15
+ $('#row-browser').show()
16
+ }
17
+ }
18
+
19
+ RED.nodes.registerType('new-session', {
20
+ category: 'Webdriver IO',
21
+ color: '#a6bbcf',
22
+ defaults: {
23
+ name: { value: '' },
24
+ webdriverUri: { value: '' },
25
+ webdriverProvider: { value: '' },
26
+ webdriverBrowser: { value: '' },
27
+ logLevel: { value: 'error' },
28
+ killSession: { value: setValue() }
29
+ },
30
+ inputs: 1,
31
+ outputs: 1,
32
+ icon: 'white-globe.png',
33
+ label: function() {
34
+ return this.name || 'new session'
35
+ }
36
+ })
37
+ </script>
38
+
39
+ <script type="text/x-red" data-template-name="new-session">
40
+ <div class="form-row">
41
+ <label for="node-input-webdriverProvider"><i class="fa fa-globe"></i> Webdriver Remote Provider</label>
42
+ <select type="text" id="node-input-webdriverProvider" style="width:70%;" onchange="setProvider()">
43
+ <option value="browserless.io">browserless.io</option>
44
+ <option value="local" selected>Local Webdriver</option>
45
+ </select>
46
+ </div>
47
+ <div class="form-row">
48
+ <label for="node-input-webdriverUri"><i class="fa fa-globe"></i> Webdriver Host URI</label>
49
+ <input id="node-input-webdriverUri" type="text" placeholder="https://host:port/path">
50
+ </div>
51
+ <div class="form-row" id="row-browser">
52
+ <label for="node-input-webdriverBrowser"><i class="fa fa-globe"></i> Browser</label>
53
+ <select type="text" id="node-input-webdriverBrowser" style="width:70%;">
54
+ <option value="chrome" selected>Chrome</option>
55
+ <option value="chromium">Chromium</option>
56
+ </select>
57
+ </div>
58
+ <div class="form-row">
59
+ <label for="node-input-logLevel"><i class="fa fa-tasks"></i> Log Level</label>
60
+ <select type="text" id="node-input-logLevel" style="width:70%;">
61
+ <option value="trace">Trace</option>
62
+ <option value="debug">Debug</option>
63
+ <option value="info">Info</option>
64
+ <option value="warn">Warn</option>
65
+ <option value="error" selected>Error</option>
66
+ <option value="silent">Silent</option>
67
+ </select>
68
+ </div>
69
+ <div class="form-row">
70
+ <label for="node-input-killSession"><i class="fa fa-tasks"></i> Kill existing session on flow deploy</label>
71
+ <input id="node-input-killSession" type="checkbox" onclick="setValue()" style="width:auto;">
72
+ </div>
73
+ <div class="form-row">
74
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
75
+ <input id="node-input-name" type="text">
76
+ </div>
77
+ </script>
78
+
79
+ <script type="text/x-red" data-help-name="new-session">
80
+ <h3>Creates new session and also sets the "wdio_browser" global variable to the new session object.</h3>
81
+ <h3>Inputs</h3>
82
+ <dl class="message-properties">
83
+ <dt>webdriverProvider: <span class="property-type">string</span></dt>
84
+ <dd>Webdriver server name.</dd>
85
+ <dt>webdriverUri: <span class="property-type">string</span></dt>
86
+ <dd>The string format should be <protocal>://<hotsname>:<port number>/<path>, user 80/8080/443 if it is service based webdriver provider.</dd>
87
+ <dd><code>msg.webdriverUri</code> can be used by leaving the webdriverUri field blank.</dd>
88
+ <dt>Browser: <span class="property-type">string</span></dt>
89
+ <dd>Current configurations are only for chrome.</dd>
90
+ <dd><code>msg.webdriverBrowser</code> can be used by leaving the webdriverBrowser blank.</dd>
91
+ <dt>logLevel: <span class="property-type">string</span></dt>
92
+ <dd>Select the log level to display the logs on console during run.</dd>
93
+ <dt>killSession: <span class="property-type">Bool</span></dt>
94
+ <dd>Kill open session during deploy. This would be helpful to debug the changes by not closing the current browser.</dd>
95
+ </dl>
96
+ </script>