Make WebDriver Get() command wait on pages loading before returning.

This makes using WebDriver significantly less racy. Also
refactors the message structure a little
This commit is contained in:
James Graham 2015-04-28 18:16:23 +01:00
parent 7e022b25a8
commit 28ac0abf6a
7 changed files with 87 additions and 39 deletions

View file

@ -35,7 +35,7 @@ fn find_node_by_unique_id(page: &Rc<Page>, pipeline: PipelineId, node_id: String
None
}
pub fn handle_evaluate_js(page: &Rc<Page>, pipeline: PipelineId, eval: String, reply: Sender<Result<EvaluateJSReply, ()>>) {
pub fn handle_execute_script(page: &Rc<Page>, pipeline: PipelineId, eval: String, reply: Sender<Result<EvaluateJSReply, ()>>) {
let page = get_page(&*page, pipeline);
let window = page.window().root();
let cx = window.r().get_cx();