based on UIAutomationRef.pdf
エレメントは階層構造になっている UIATarget.localTarget()を最上位とする
| // http://www.softantenna.com/wp/software/5-programming-problems/ | |
| var assert = require('assert'); | |
| //(1) forループ、whileループ、および再帰を使用して、リスト内の数字の合計を計算する3つの関数を記述せよ。 | |
| (function() { | |
| function forSum(inputs) { | |
| var sum = 0; | |
| for (var i = 0; i < inputs.length; i++) { | |
| sum += inputs[i]; |
| #!/bin/sh | |
| # 一時フォルダの場合は特に制限を入れない | |
| if [[ $PWD =~ ^/private/var/folders/ ]] ; then | |
| exit 0 | |
| fi | |
| if [ -z "`git config --local user.name`" ]; then | |
| echo "\033[31m ✗ FATAL: user.name is not set locally \033[0m" | |
| echo "\033[35mgit config user.name {your-name}\033[0m" |
| #include "TrinketFakeUsbSerial.h" | |
| void setup() | |
| { | |
| TFUSerial.begin(); | |
| } | |
| void loop() | |
| { | |
| TFUSerial.task(); // this should be called at least once every 10 ms |
| require 'selenium-webdriver' | |
| require 'eyes_selenium' | |
| require 'rubygems' | |
| eyes = Applitools::Eyes.new | |
| # This is your api key, make sure you use it in all your tests. | |
| eyes.api_key = 'LZaId14atU1nIA1MQIWqPwNQvWiskKuweYAx66D1rCQ110(仮)' | |
| # Setup appium - Ensure the capabilities meets your environment. | |
| # Refer to http://appium.io documentation if required. |
| global.expect = require('chai').expect; | |
| global.sinon = require('sinon').expect; | |
| // clear console | |
| process.stdout.write('\u001b[2J\u001b[0;0H'); |
| #!/bin/bash | |
| # [usage] | |
| # instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]] | |
| # --- 環境設定 | |
| APP_NAME=<TargetAppName> | |
| # for 7.0.3-64 | |
| #SIMULATOR_VERSION=7.0.3-64 | |
| #GUID=9BAC4C3E-BBC2-4805-A115-A310CB21A941 |
based on UIAutomationRef.pdf
エレメントは階層構造になっている UIATarget.localTarget()を最上位とする
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| selenium.getEval( | |
| "selenium.isElementPresent('id=foo') && " + | |
| "selenium.isVisible('id=foo')"); |
| // 良くない例:<body>の中のテキストを全て取得して検証している | |
| String text = selenium.getBodyText(); | |
| assertTrue(text.contains("hello")); | |
| WebElement body = webdriver.findElement( | |
| By.tagName("body")); | |
| String text = body.getText(); | |
| assertTrue(text.contains("hello")); |