@seleniumhq/code-export-csharp-nunit 3.17.0 → 3.17.2
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.
- package/__test__/src/__snapshots__/command.spec.js.snap +1 -1
- package/__test__/src/__snapshots__/index.spec.js.snap +17 -3
- package/__test__/src/index.spec.js +10 -1
- package/dist/index.js +2 -1
- package/package.json +4 -5
- package/src/index.js +1 -0
- package/LICENSE +0 -202
- package/dist/hooks/afterAll.js +0 -48
- package/dist/hooks/afterEach.js +0 -49
- package/dist/hooks/beforeAll.js +0 -48
- package/dist/hooks/beforeEach.js +0 -50
- package/dist/hooks/declareDependencies.js +0 -66
- package/dist/hooks/declareMethods.js +0 -53
- package/dist/hooks/declareVariables.js +0 -48
- package/dist/hooks/inEach.js +0 -42
- package/dist/hooks/inEachBegin.js +0 -42
- package/dist/hooks/inEachEnd.js +0 -42
- package/dist/hooks/index.js +0 -61
- package/dist/location.js +0 -68
- package/dist/parsers.js +0 -31
- package/dist/selection.js +0 -57
- package/yarn-error.log +0 -2151
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
7
|
-
// or more contributor license agreements. See the NOTICE file
|
|
8
|
-
// distributed with this work for additional information
|
|
9
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
10
|
-
// to you under the Apache License, Version 2.0 (the
|
|
11
|
-
// "License"); you may not use this file except in compliance
|
|
12
|
-
// with the License. You may obtain a copy of the License at
|
|
13
|
-
//
|
|
14
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
//
|
|
16
|
-
// Unless required by applicable law or agreed to in writing,
|
|
17
|
-
// software distributed under the License is distributed on an
|
|
18
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
-
// KIND, either express or implied. See the License for the
|
|
20
|
-
// specific language governing permissions and limitations
|
|
21
|
-
// under the License.
|
|
22
|
-
|
|
23
|
-
let variables = `
|
|
24
|
-
private WebDriver driver;
|
|
25
|
-
private HashMap<String, Object> vars = new HashMap<String, Object>();
|
|
26
|
-
JavascriptExecutor js;
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
let hooks = [];
|
|
30
|
-
|
|
31
|
-
function register(statement) {
|
|
32
|
-
hooks.push(statement);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function clear() {
|
|
36
|
-
hooks = [];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function emit({ isOptional } = { isOptional: false }) {
|
|
40
|
-
if (isOptional && !hooks.length) return '';
|
|
41
|
-
return variables + hooks.join('\r\n');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
exports.default = {
|
|
45
|
-
register,
|
|
46
|
-
clear,
|
|
47
|
-
emit
|
|
48
|
-
};
|
package/dist/hooks/inEach.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
7
|
-
// or more contributor license agreements. See the NOTICE file
|
|
8
|
-
// distributed with this work for additional information
|
|
9
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
10
|
-
// to you under the Apache License, Version 2.0 (the
|
|
11
|
-
// "License"); you may not use this file except in compliance
|
|
12
|
-
// with the License. You may obtain a copy of the License at
|
|
13
|
-
//
|
|
14
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
//
|
|
16
|
-
// Unless required by applicable law or agreed to in writing,
|
|
17
|
-
// software distributed under the License is distributed on an
|
|
18
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
-
// KIND, either express or implied. See the License for the
|
|
20
|
-
// specific language governing permissions and limitations
|
|
21
|
-
// under the License.
|
|
22
|
-
|
|
23
|
-
let hooks = [];
|
|
24
|
-
|
|
25
|
-
function register(statement) {
|
|
26
|
-
hooks.push(statement);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function clear() {
|
|
30
|
-
hooks = [];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function emit({ isOptional } = { isOptional: false }) {
|
|
34
|
-
if (isOptional && !hooks.length) return '';
|
|
35
|
-
return hooks.join('\r\n');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.default = {
|
|
39
|
-
register,
|
|
40
|
-
clear,
|
|
41
|
-
emit
|
|
42
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
7
|
-
// or more contributor license agreements. See the NOTICE file
|
|
8
|
-
// distributed with this work for additional information
|
|
9
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
10
|
-
// to you under the Apache License, Version 2.0 (the
|
|
11
|
-
// "License"); you may not use this file except in compliance
|
|
12
|
-
// with the License. You may obtain a copy of the License at
|
|
13
|
-
//
|
|
14
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
//
|
|
16
|
-
// Unless required by applicable law or agreed to in writing,
|
|
17
|
-
// software distributed under the License is distributed on an
|
|
18
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
-
// KIND, either express or implied. See the License for the
|
|
20
|
-
// specific language governing permissions and limitations
|
|
21
|
-
// under the License.
|
|
22
|
-
|
|
23
|
-
let hooks = [];
|
|
24
|
-
|
|
25
|
-
function register(statement) {
|
|
26
|
-
hooks.push(statement);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function clear() {
|
|
30
|
-
hooks = [];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function emit({ isOptional } = { isOptional: false }) {
|
|
34
|
-
if (isOptional && !hooks.length) return '';
|
|
35
|
-
return hooks.join('\r\n');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.default = {
|
|
39
|
-
register,
|
|
40
|
-
clear,
|
|
41
|
-
emit
|
|
42
|
-
};
|
package/dist/hooks/inEachEnd.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
7
|
-
// or more contributor license agreements. See the NOTICE file
|
|
8
|
-
// distributed with this work for additional information
|
|
9
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
10
|
-
// to you under the Apache License, Version 2.0 (the
|
|
11
|
-
// "License"); you may not use this file except in compliance
|
|
12
|
-
// with the License. You may obtain a copy of the License at
|
|
13
|
-
//
|
|
14
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
//
|
|
16
|
-
// Unless required by applicable law or agreed to in writing,
|
|
17
|
-
// software distributed under the License is distributed on an
|
|
18
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
-
// KIND, either express or implied. See the License for the
|
|
20
|
-
// specific language governing permissions and limitations
|
|
21
|
-
// under the License.
|
|
22
|
-
|
|
23
|
-
let hooks = [];
|
|
24
|
-
|
|
25
|
-
function register(statement) {
|
|
26
|
-
hooks.push(statement);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function clear() {
|
|
30
|
-
hooks = [];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function emit({ isOptional } = { isOptional: false }) {
|
|
34
|
-
if (isOptional && !hooks.length) return '';
|
|
35
|
-
return hooks.join('\r\n');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.default = {
|
|
39
|
-
register,
|
|
40
|
-
clear,
|
|
41
|
-
emit
|
|
42
|
-
};
|
package/dist/hooks/index.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.clearHooks = clearHooks;
|
|
7
|
-
|
|
8
|
-
var _declareDependencies = require('./declareDependencies');
|
|
9
|
-
|
|
10
|
-
var _declareDependencies2 = _interopRequireDefault(_declareDependencies);
|
|
11
|
-
|
|
12
|
-
var _declareVariables = require('./declareVariables');
|
|
13
|
-
|
|
14
|
-
var _declareVariables2 = _interopRequireDefault(_declareVariables);
|
|
15
|
-
|
|
16
|
-
var _beforeAll = require('./beforeAll');
|
|
17
|
-
|
|
18
|
-
var _beforeAll2 = _interopRequireDefault(_beforeAll);
|
|
19
|
-
|
|
20
|
-
var _afterAll = require('./afterAll');
|
|
21
|
-
|
|
22
|
-
var _afterAll2 = _interopRequireDefault(_afterAll);
|
|
23
|
-
|
|
24
|
-
var _inEachBegin = require('./inEachBegin');
|
|
25
|
-
|
|
26
|
-
var _inEachBegin2 = _interopRequireDefault(_inEachBegin);
|
|
27
|
-
|
|
28
|
-
var _inEachEnd = require('./inEachEnd');
|
|
29
|
-
|
|
30
|
-
var _inEachEnd2 = _interopRequireDefault(_inEachEnd);
|
|
31
|
-
|
|
32
|
-
var _declareMethods = require('./declareMethods');
|
|
33
|
-
|
|
34
|
-
var _declareMethods2 = _interopRequireDefault(_declareMethods);
|
|
35
|
-
|
|
36
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
-
|
|
38
|
-
//import beforeEach from './beforeEach'
|
|
39
|
-
//import afterEach from './afterEach'
|
|
40
|
-
const hooks = [_declareDependencies2.default, _declareVariables2.default, _beforeAll2.default,
|
|
41
|
-
//beforeEach,
|
|
42
|
-
//afterEach,
|
|
43
|
-
_afterAll2.default, _inEachBegin2.default, _inEachEnd2.default, _declareMethods2.default];
|
|
44
|
-
|
|
45
|
-
function clearHooks() {
|
|
46
|
-
hooks.forEach(hook => {
|
|
47
|
-
hook.clear();
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
exports.default = {
|
|
52
|
-
dependencies: _declareDependencies2.default,
|
|
53
|
-
variables: _declareVariables2.default,
|
|
54
|
-
beforeAll: _beforeAll2.default,
|
|
55
|
-
//beforeEach,
|
|
56
|
-
//afterEach,
|
|
57
|
-
afterAll: _afterAll2.default,
|
|
58
|
-
inEachBegin: _inEachBegin2.default,
|
|
59
|
-
inEachEnd: _inEachEnd2.default,
|
|
60
|
-
methods: _declareMethods2.default
|
|
61
|
-
};
|
package/dist/location.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.emit = emit;
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
|
|
9
|
-
var _sideUtils = require("@seleniumhq/side-utils");
|
|
10
|
-
|
|
11
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
12
|
-
// or more contributor license agreements. See the NOTICE file
|
|
13
|
-
// distributed with this work for additional information
|
|
14
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
15
|
-
// to you under the Apache License, Version 2.0 (the
|
|
16
|
-
// "License"); you may not use this file except in compliance
|
|
17
|
-
// with the License. You may obtain a copy of the License at
|
|
18
|
-
//
|
|
19
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
//
|
|
21
|
-
// Unless required by applicable law or agreed to in writing,
|
|
22
|
-
// software distributed under the License is distributed on an
|
|
23
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
24
|
-
// KIND, either express or implied. See the License for the
|
|
25
|
-
// specific language governing permissions and limitations
|
|
26
|
-
// under the License.
|
|
27
|
-
const emitters = {
|
|
28
|
-
id: emitId,
|
|
29
|
-
name: emitName,
|
|
30
|
-
link: emitLink,
|
|
31
|
-
linkText: emitLink,
|
|
32
|
-
partialLinkText: emitPartialLinkText,
|
|
33
|
-
css: emitCss,
|
|
34
|
-
xpath: emitXpath
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
function emit(location) {
|
|
38
|
-
return _sideUtils.codeExport.emit.location(location, emitters);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var _default = {
|
|
42
|
-
emit
|
|
43
|
-
};
|
|
44
|
-
exports.default = _default;
|
|
45
|
-
|
|
46
|
-
function emitId(selector) {
|
|
47
|
-
return Promise.resolve(`By.Id("${selector}")`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function emitName(selector) {
|
|
51
|
-
return Promise.resolve(`By.Name("${selector}")`);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function emitLink(selector) {
|
|
55
|
-
return Promise.resolve(`By.LinkText("${selector}")`);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function emitPartialLinkText(selector) {
|
|
59
|
-
return Promise.resolve(`By.PartialLinkText("${selector}")`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function emitCss(selector) {
|
|
63
|
-
return Promise.resolve(`By.CssSelector("${selector}")`);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function emitXpath(selector) {
|
|
67
|
-
return Promise.resolve(`By.XPath("${selector}")`);
|
|
68
|
-
}
|
package/dist/parsers.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.sanitizeName = sanitizeName;
|
|
7
|
-
exports.capitalize = capitalize;
|
|
8
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
9
|
-
// or more contributor license agreements. See the NOTICE file
|
|
10
|
-
// distributed with this work for additional information
|
|
11
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
12
|
-
// to you under the Apache License, Version 2.0 (the
|
|
13
|
-
// "License"); you may not use this file except in compliance
|
|
14
|
-
// with the License. You may obtain a copy of the License at
|
|
15
|
-
//
|
|
16
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
//
|
|
18
|
-
// Unless required by applicable law or agreed to in writing,
|
|
19
|
-
// software distributed under the License is distributed on an
|
|
20
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
-
// KIND, either express or implied. See the License for the
|
|
22
|
-
// specific language governing permissions and limitations
|
|
23
|
-
// under the License.
|
|
24
|
-
|
|
25
|
-
function sanitizeName(input) {
|
|
26
|
-
return input.replace(/([^a-z0-9]+)/gi, '');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function capitalize(input) {
|
|
30
|
-
return input.charAt(0).toUpperCase() + input.substr(1);
|
|
31
|
-
}
|
package/dist/selection.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.emit = emit;
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
|
|
9
|
-
var _sideUtils = require("@seleniumhq/side-utils");
|
|
10
|
-
|
|
11
|
-
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
12
|
-
// or more contributor license agreements. See the NOTICE file
|
|
13
|
-
// distributed with this work for additional information
|
|
14
|
-
// regarding copyright ownership. The SFC licenses this file
|
|
15
|
-
// to you under the Apache License, Version 2.0 (the
|
|
16
|
-
// "License"); you may not use this file except in compliance
|
|
17
|
-
// with the License. You may obtain a copy of the License at
|
|
18
|
-
//
|
|
19
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
//
|
|
21
|
-
// Unless required by applicable law or agreed to in writing,
|
|
22
|
-
// software distributed under the License is distributed on an
|
|
23
|
-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
24
|
-
// KIND, either express or implied. See the License for the
|
|
25
|
-
// specific language governing permissions and limitations
|
|
26
|
-
// under the License.
|
|
27
|
-
const emitters = {
|
|
28
|
-
id: emitId,
|
|
29
|
-
value: emitValue,
|
|
30
|
-
label: emitLabel,
|
|
31
|
-
index: emitIndex
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
function emit(location) {
|
|
35
|
-
return _sideUtils.codeExport.emit.selection(location, emitters);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var _default = {
|
|
39
|
-
emit
|
|
40
|
-
};
|
|
41
|
-
exports.default = _default;
|
|
42
|
-
|
|
43
|
-
function emitId(id) {
|
|
44
|
-
return Promise.resolve(`By.CssSelector("*[id='${id}']")`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function emitValue(value) {
|
|
48
|
-
return Promise.resolve(`By.CssSelector("*[value='${value}']")`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function emitLabel(label) {
|
|
52
|
-
return Promise.resolve(`By.XPath("//option[. = '${label}']")`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function emitIndex(index) {
|
|
56
|
-
return Promise.resolve(`By.CssSelector("*:nth-child(${index})")`);
|
|
57
|
-
}
|