如何将新行添加到 动态 的现有行中,并显示在电子表格的各个部分中?
E.g。当我点击“添加新行'将 一行 添加到一组行中:
-------------------------------------------------------
ROW 1
-------------------------------------------------------
ROW 2
-------------------------------------------------------
NEW LINE <--- New row is added from the 'add new line'
但是,这需要是动态的,以便在行数不同的地方添加另一行:
-------------------------------------------------------
ROW 1
-------------------------------------------------------
ROW 2
-------------------------------------------------------
ROW 3
-------------------------------------------------------
ROW 4
-------------------------------------------------------
NEW LINE <--- New row is added from the 'add new line'
该部分的位置作为参数&#39; sectionNumber&#39;传递。有没有办法使用这个参数来找到行的部分的位置,然后计算它们并添加如上所示的新行?
答案 0 :(得分:0)
尝试使用以下代码
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
Boolean check = false;
while (!check) {
try {
driver.getTitle();
Thread.sleep(200);
} catch (Exception e) {
//you can verify correct exception here ie not reachable, dead etc..
check = true;
}
}
System.out.println("after browser close");
//continue your code here