mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
wrap getFieldsTabCount in tryForTime
give it a chance to fail up to 10 times before failing completely
This commit is contained in:
parent
4fdbc265c8
commit
43a5e2b838
1 changed files with 7 additions and 5 deletions
|
@ -126,11 +126,13 @@ define(function (require) {
|
|||
var self = this;
|
||||
var selector = 'li.kbn-settings-tab.active a small';
|
||||
|
||||
return self.remote.setFindTimeout(defaultTimeout)
|
||||
.findByCssSelector(selector).getVisibleText()
|
||||
.then(function (theText) {
|
||||
// the value has () around it, remove them
|
||||
return theText.replace(/\((.*)\)/, '$1');
|
||||
return common.tryForTime(defaultTimeout, function () {
|
||||
return self.remote.setFindTimeout(defaultTimeout / 10)
|
||||
.findByCssSelector(selector).getVisibleText()
|
||||
.then(function (theText) {
|
||||
// the value has () around it, remove them
|
||||
return theText.replace(/\((.*)\)/, '$1');
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue