Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appium Php Error: You must include a platformName capability #45

Open
jeyakumarsbe opened this issue Apr 20, 2018 · 0 comments
Open

Appium Php Error: You must include a platformName capability #45

jeyakumarsbe opened this issue Apr 20, 2018 · 0 comments

Comments

@jeyakumarsbe
Copy link

jeyakumarsbe commented Apr 20, 2018

Hi,

I'm new to appium. I write my first script and executed its throwing below error.
Below same Capabilities working Appium desktop Session.

My Code:

require_once "vendor/autoload.php";

class MySuperTests extends PHPUnit_Extensions_AppiumTestCase
{
public static $browsers = array(
array(
'host' => true,
'port' => 4444,
'browserName' => '',
'desiredCapabilities' => array(
'app' => 'D:\xamp\htdocs\appium\sample-code\examples\test\myapp.apk',
'platformName' => 'Android',
'platformVersion' => '7.0',
'deviceName' => 'emulator-5551'
)
)
);

// this fails for some reason
public function testInstallApp()
{
    $this->installApp('D:\xamp\htdocs\appium\sample-code\examples\test\myapp.apk');
}

}

$obj = new MySuperTests();
$obj->testInstallApp();

Got Below Error:

[info] [Appium] Welcome to Appium v1.7.2
[info] [Appium] Non-default server args:
[info] [Appium] address: localhost
[info] [Appium] port: 4444
[info] [Appium] Appium REST http interface listener started on localhost:4444[info] [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":""}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":""},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1524208895020 (12:51:35 GMT+0530 (India Standard Time))
[error] [MJSONWP] Encountered internal error running command: Error: You must include a platformName capability
at AppiumDriver.getDriverForCaps (C:\Users\testuser\AppData\Local\appium-desktop\app-1.5.0\resources\app\node_modules\appium\lib\appium.js:66:13)

Please suggest me what i did wrong. I was executed php using command line
D:\xamp\htdocs\appium\sample-code\examples\test>php mytest.php

Thanks,
Jay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant