1
我需要使用一个变量,其值是基于CSS样式像素确定的。 测试找到左侧像素的值,然后选择特定的单元格。但是当我运行这个测试时,这个值总是为0而不是实际应该是的。在实习生功能测试中使用变量
'Test' : function() {
var left = 0;
var remote = this.remote;
return remote
.setFindTimeout(5000)
.findByXpath("//div[@class = 'grid']//div[@class = 'gridCell' and position() = 1]/div[3]")
.getAttribute("style")
.then(function(width) {
left = parseInt(width.substring(width.indexOf("left")+6,width.indexOf("width")-4));
}).end()
.f_selectCell("", 0, left)
},