0
我想在所有選項卡之間切換,然後按ENTER鍵。切換窗口句柄,然後按Enter鍵
web.SwitchTo().Window(web.WindowHandles[windowCounter]); javascript.ExecuteScript("$('button').click();");
。 如果我只是使用SwitchTo循環而沒有執行Javascript,則需要7ms在所有選項卡之間進行切換。
當我使用JS時,似乎它正在等待完成加載文檔。我怎樣才能快速切換選項卡,並按下輸入到所有他們,而無需等待負載?
你確定它會很快嗎?它只需在4個選項卡中單擊此按鈕,每個選項卡的範圍時間小於200毫秒 – TNation
@TNation它不會等待頁面加載,因此範圍時間應小於1毫秒。 – Buaban
我已經打開了一個驅動程序。驅動程序等待頁面加載。我可以在運行時禁用等待嗎? – TNation