Permalink
Browse files

Make the SimpleTest working with appium 1.4.8 / iOS 8.4

1 parent 5699bb7 commit dc927842cea08d0fb7141ea6968554dae32320b3 Erwan de FERRIERES committed Jul 28, 2015
Showing with 8 additions and 8 deletions.
  1. +8 −8 sample-code/examples/php/SimpleTest.php
@@ -4,7 +4,7 @@
// vendor/bin/phpunit SimpleTest.php
require_once "vendor/autoload.php";
-define("APP_PATH", realpath(dirname(__FILE__).'/../../apps/TestApp/build/Release-iphonesimulator/TestApp.app'));
+define("APP_PATH", realpath(dirname(__FILE__).'/../../apps/TestApp/build/release-iphonesimulator/TestApp.app'));
if (!APP_PATH) {
die("App did not exist!");
}
@@ -20,22 +20,22 @@ class SimpleTest extends Sauce\Sausage\WebDriverTestCase
'port' => 4723,
'browserName' => '',
'desiredCapabilities' => array(
- 'device' => 'iPhone Simulator',
- 'version' => '6.0',
- 'platform' => 'Mac',
+ 'deviceName' => '=iPhone 5s',
+ 'version' => '8.4 Simulator',
+ 'platformName' => 'iOS',
'app' => APP_PATH
)
)
);
public function elemsByTag($tag)
{
- return $this->elements($this->using('tag name')->value($tag));
+ return $this->elements($this->using('class name')->value($tag));
}
protected function populate()
{
- $elems = $this->elemsByTag('textField');
+ $elems = $this->elemsByTag('UIATextField');
foreach ($elems as $elem) {
$randNum = rand(0, 10);
$elem->value($randNum);
@@ -46,9 +46,9 @@ protected function populate()
public function testUiComputation()
{
$this->populate();
- $buttons = $this->elemsByTag('button');
+ $buttons = $this->elemsByTag('UIAButton');
$buttons[0]->click();
- $texts = $this->elemsByTag('staticText');
+ $texts = $this->elemsByTag('UIAStaticText');
$this->assertEquals(array_sum($this->numValues), (int)($texts[0]->text()));
}
}

0 comments on commit dc92784

Please sign in to comment.