|
|
@ -5,9 +5,9 @@ class ConnectToExternalHttpProvider extends EventEmitter { |
|
|
|
command(this: NightwatchBrowser, url: string, identifier: string): NightwatchBrowser { |
|
|
|
command(this: NightwatchBrowser, url: string, identifier: string): NightwatchBrowser { |
|
|
|
this.api.element('xpath', `//*[@class='udapp_environment' and contains(.,'${identifier}')]`, |
|
|
|
this.api.element('xpath', `//*[@class='udapp_environment' and contains(.,'${identifier}')]`, |
|
|
|
(result) => { |
|
|
|
(result) => { |
|
|
|
if (result.status as any === -1 ) { |
|
|
|
if (result.status as any === -1) { |
|
|
|
console.log("No connection to external provider found. Adding one.", url) |
|
|
|
console.log("No connection to external provider found. Adding one.", url) |
|
|
|
browser |
|
|
|
this |
|
|
|
.click({ |
|
|
|
.click({ |
|
|
|
locateStrategy: 'css selector', |
|
|
|
locateStrategy: 'css selector', |
|
|
|
selector: '[data-id="basic-http-provider-modal-footer-ok-react"]', |
|
|
|
selector: '[data-id="basic-http-provider-modal-footer-ok-react"]', |
|
|
|