Robot Frame work with Appium throws KeyError:'Platform Name' i
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'. Keyerror Issue.txt
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 Keyerror Issue.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'
Did you try newer versions of Appium ? Such as 1.6.3.
If you are using the Desktop app for appium, just install Appium as external.

@prgovind Try changing your Open Application string to:
Open Application http://127.0.0.1:4723/wd/hub platformName=Android platformVersion=4.4.2 deviceName=42034dbac8074100 browserName=Chrome
I have exactly the same issue on Windows 10(Installed latest version of Appium). In my case, it was caused by robotframework-appiumlibrary-1.4.3 Downgrading to version 1.3.2 fixed the issue, but unfortunately there are some useful keywords missing (like count xpath matches) Can anyone suggest how I can use the latest version? That's the log when I am trying to click on element using version 1.4.3:
17:15:14.286 FAIL KeyError: 'platformName'
17:15:14.286
DEBUG
Traceback (most recent call last):
File "
@arthurmx which version appium are you using
@serhatbolsu 1.4.16 Upgrading to the v, 1.6.3 fixed this Issue
@prgovind and @arthurmx I'm able to automate above test case. Appium Version - 1.4.16 robotframwork - 3.0 robotframwork-appiumlibrary - 1.3.5
Below is my code:
*** Settings ***
Library AppiumLibrary
*** Test Cases ***
TC_Gmail_Login
[Documentation] Login into Gmail Account
Open Browser to Login Gmail
AppiumLibrary.Input Text xpath=//input [@id='Email'] [email protected]
AppiumLibrary.Click Element xpath=//input [@id='next']
AppiumLibrary.Wait Until Page Contains Element xpath=//input [@id='Passwd'] 20
AppiumLibrary.Input Text xpath=//input [@id='Passwd'] abcde
AppiumLibrary.Click Element xpath=//input [@id='signIn']
AppiumLibrary.Wait Until Page Contains Element xpath=//div[@aria-label='Compose' and @role='button'] 20
[Teardown] AppiumLibrary.Close Application
*** Keywords ***
Open Browser to Login Gmail
[Documentation] asdasd
Open Application http://127.0.0.1:4723/wd/hub platformName=Android platformVersion=5.0.1 deviceName=yourdevicename app=com.android.browser automationName=appium appPackage=com.android.browser appActivity=com.google.android.apps.chrome.Main
Go To Url https://www.gmail.com
Wait Until Page Contains Enter your email 20
@prgovind from your log file I could only found out that appium is timing out due to command not received within 60 sec, can you try with bigger command-timeout e.g. I start appium on command line with below command
appium --command-timeout 0
Closing due to inactivity