From 2b30e228d0d3c400955c4dc955e87258b80fb6be Mon Sep 17 00:00:00 2001 From: Felix Rodriguez Date: Fri, 20 Sep 2013 16:28:32 -0700 Subject: [PATCH] add ruby example --- docs/hybrid.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/hybrid.md b/docs/hybrid.md index 4ad79cac4..142467759 100644 --- a/docs/hybrid.md +++ b/docs/hybrid.md @@ -99,7 +99,7 @@ Once installed you can start the proxy with the following command: ## Wd.ruby Code example using cucumber -``` +```ruby TEST_NAME = "Example Ruby Test" SERVER_URL = "http://127.0.0.1:4723/wd/hub" APP_PATH = "https://dl.dropboxusercontent.com/s/123456789101112/ts_ios.zip" @@ -123,12 +123,12 @@ Given(/^I switch to webview$/) do end Given(/^I switch out of webview$/) do - @driver.executeScript("mobile: leaveWebView;") + @driver.execute_script("mobile: leaveWebView") end # Now you can use CSS to select an element inside your webview And(/^I click a webview button $/) do - $driver.find_element(:css, ".green_button").click + @driver.find_element(:css, ".green_button").click end ```