无法理解为什么它返回一个对象而不是文本值,一些测试代码:
describe('columns swap', function () {
describe('location column ', function () {
it('should swap right', function () {
browser.sleep(10000);
var fColumn = element(by.xpath('(//*[@class="k-link"])[2]')).getText();
console.log(fColumn);
Run Code Online (Sandbox Code Playgroud)
控制台输出:
> columns swap
> location column { ptor_: { controlFlow: [Function],
> schedule: [Function],
> getSession: [Function],
> getCapabilities: [Function],
> quit: [Function],
> actions: [Function],
> executeScript: [Function],
> executeAsyncScript: [Function],
> call: [Function],
> wait: [Function],
> sleep: [Function],
> getWindowHandle: [Function],
> getAllWindowHandles: [Function],
> getPageSource: [Function],
> close: [Function],
> getCurrentUrl: …Run Code Online (Sandbox Code Playgroud)