aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorJames Graham <james@hoppipolla.co.uk>2015-05-06 22:35:22 +0100
committerJames Graham <james@hoppipolla.co.uk>2015-05-08 22:25:37 +0100
commit9e44206760864da99ff30bd52e70f7da6aad6250 (patch)
tree648172237120fb4cdf9f0b3afc5f86c60d34e5a3 /components/script/script_task.rs
parent892a7404266983c6d51218bc18b8aa878d9a7a3e (diff)
downloadservo-9e44206760864da99ff30bd52e70f7da6aad6250.tar.gz
servo-9e44206760864da99ff30bd52e70f7da6aad6250.zip
Add WebDriver support for getting elements by selector.
Also adds example support for getting the name and text properties of the elements.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 12ae363c95b..6073441e675 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -791,6 +791,14 @@ impl ScriptTask {
match msg {
WebDriverScriptCommand::EvaluateJS(script, reply) =>
webdriver_handlers::handle_evaluate_js(&page, pipeline_id, script, reply),
+ WebDriverScriptCommand::FindElementCSS(selector, reply) =>
+ webdriver_handlers::handle_find_element_css(&page, pipeline_id, selector, reply),
+ WebDriverScriptCommand::FindElementsCSS(selector, reply) =>
+ webdriver_handlers::handle_find_elements_css(&page, pipeline_id, selector, reply),
+ WebDriverScriptCommand::GetElementTagName(node_id, reply) =>
+ webdriver_handlers::handle_get_name(&page, pipeline_id, node_id, reply),
+ WebDriverScriptCommand::GetElementText(node_id, reply) =>
+ webdriver_handlers::handle_get_text(&page, pipeline_id, node_id, reply),
WebDriverScriptCommand::GetTitle(reply) =>
webdriver_handlers::handle_get_title(&page, pipeline_id, reply)
}