1
votes

I am learning how to use Appium with Robot Framework. My Test case is to login and logout a Gmail webpage in Chrome using a Samsung mobile, with Android version 4.4.2.

web page is launched successfully - but while entering the username, I am faced with an issue of:

Keyerror: 'Platform Name'.

SW version:

Appium Version - 1.4.16
Robot Frame work Version - 3.0

Below is my Robot code I am using:

 *** settings ***
 Library     AppiumLibrary
 Resource    D:\\Resource.txt

 *** Test Cases ***
 Login into Gmail Account
     Open Browser to Login Gmail
     Login Details


 *** Keywords ***
 Open Browser to Login Gmail  

     Open Application    http://127.0.0.1:4723/wd/hub  platformName=Android  platformVersion=4.4.2  deviceName=42034dbac8074100  app=com.android.browser  automationName=appium  appPackage=com.android.browser  appActivity=com.google.android.apps.chrome.Main
     Go To Url    https://www.gmail.com
     Sleep    5
     #Wait Until Page Contains    ${loginID}

Login Details   
     Input Text    ${loginID}    ${UserNameValue}   
     Click Element    ${Next}   
     Input Password    ${Password}    ${PwdValue}

Which results in the error:

KeyError: 'platformName'

2

2 Answers

0
votes

We also faced same kind of issue with respect to Windows app while clicking on any element after opening app.We have updated Appium python client from 0.24 to 0.26 and robot framework -appiumLibrary from 1.4.4 to 1.4.6 which solves the problem.Hopefully in your case also the library update will solve the problem

0
votes

From the looks of the code, you're missing spacing. You need 4 spaces between parameters on that "Open Application" line, looks like you only have 2. So

http://127.0.0.1:4723/wd/hub  platformName=Android  platformVersion=4.4.2 

needs to be

http://127.0.0.1:4723/wd/hub    platformName=Android    platformVersion=4.4.2