メニューバーにドロップダウンがあります。ドロップダウンをテストしているときは、正常に機能しています。しかし、ドロップダウンのアイテムをクリックすると、そのアイテムに関連するデータが表示されません。
テスト :
it('Add Patient', function(){
ptor = protractor.getInstance();
var dropdown = element.all(by.css('.dropdown')).get(3);
var toggle = dropdown.element(by.css('.dropdown-toggle'));
toggle.click();
toggle.click();
ptor.sleep(2000);
var list = dropdown.all(by.css('.dropdown-menu li'));
expect(list.get(1).getText()).toEqual('Patients');
var test = list.get(1);
test.click();
});
そして、ログはこのように印刷されます。
Dropdown Log***** { parentElementArrayFinder:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
elementArrayFinder_:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] }
Toggle Log******** { parentElementArrayFinder:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown-toggle' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
elementArrayFinder_:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown-toggle' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] }
List log***** { getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown-menu li' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] }
Test log***** { parentElementArrayFinder:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown-menu li' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
elementArrayFinder_:
{ getWebElements: [Function],
actionResults_: undefined,
locator_: { using: 'css selector', value: '.dropdown-menu li' },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] },
click: [Function],
sendKeys: [Function],
getTagName: [Function],
getCssValue: [Function],
getAttribute: [Function],
getText: [Function],
getSize: [Function],
getLocation: [Function],
isEnabled: [Function],
isSelected: [Function],
submit: [Function],
clear: [Function],
isDisplayed: [Function],
getOuterHtml: [Function],
getInnerHtml: [Function],
getId: [Function] }