Coder Social home page Coder Social logo

Importing test library '/path/AppiumLibrary' failed: ValueError: Expecting , delimiter: line 171 column 5 (char 4660) about robotframework-appiumlibrary HOT 7 CLOSED

rockyav avatar rockyav commented on June 18, 2024
Importing test library '/path/AppiumLibrary' failed: ValueError: Expecting , delimiter: line 171 column 5 (char 4660)

from robotframework-appiumlibrary.

Comments (7)

jollychang avatar jollychang commented on June 18, 2024

could you provide more logs?
such as content of /Users/vunguyen/automation/customclient/libs/keywordsLib/customAppKeywords.txt

from robotframework-appiumlibrary.

rockyav avatar rockyav commented on June 18, 2024

Hi,

The file “customAppKeywords.txt” is the file content the keyword for iOS testing. I don’t have permission to give other.
I only provide a part :

*** Settings ***
Documentation BASE LIBRARY: This is library which contains most commonly used keywords across all testsuites and testcases and also imports all necessary modules, keywords, variables, and python libraries
Library Collections
Library String
Library ${APPIUM_ROBOT_LIB}
#Library ${APPIUM_IOS_LIB} #SHOULD ADD OR NOT?
Library ${RESOURCE_HOME}/pyLib/base.py ${DEVICE_NAME}
Library ${RESOURCE_HOME}/pyLib/deviceAction.py ${DEVICE_NAME}
#Library ${RESOURCE_HOME}/pyLib/accountAction.py ${DEVICE_NAME}
#Library ${RESOURCE_HOME}/pyLib/device.py ${DEVICE_NAME}
Resource myPlans.txt
Resource billing.txt
Resource manageDevices.txt
Resource specialOffers.txt
Resource oobe.txt
Resource private.txt
Resource ${TENANT_NAME}.txt
Variables GlobalVariables.py

*** Variables ***
${automation_name}
${local_sleep_time} 30
${local_timeout} 30
${total_sleep_time} ${sleep_time} + ${local_sleep_time}
${total_timeout} ${timeout} + ${local_timeout}
${this_error_msg} None
${this_oncode} None
${default_partner_env} ${zact_qaautomation}

tracking login to skip next time

${login_counter} 0
${tenant_name} ZACT
${android_app_package} com.itsoninc.android.itsonclient
${this_email_address} None

*** Keywords ***
Open Application On Device
[Documentation] Retrieve all necessary information about the device and launch an appium session.
... Note: Make sure your device is stated within deviceManifest.
Log To Console Starting application
listOfDevices
${port}= get_port
${platform_name}= get_platform
${platform_version}= get_version
${app}= get_app
${device_type_tmp} get_device_info
Set Suite Variable ${device_type} ${device_type_tmp}
${current_device_email} get_emailid
${this_email_address}= Set Variable If '${this_email_address}' == 'None' ${current_device_email} ${this_email_address}
${android_app_package}= Set Variable If '${app}' == 'None' ${android_app_package}
... '${app}' == '${EMPTY}' ${android_app_package} ${app}
Run Keyword If '${platform_name}' == 'Android' Run Keyword And Ignore Error open_application ${remote_url} ${platform_name} ${platform_version} ${device_name} ${app} ${automation_name} ${android_app_package} ${android_app_activity}
Run Keyword If '${platform_name}' == 'iOS' Run Keyword And Ignore Error open_application ${remote_url} ${platform_name} ${platform_version} ${device_name} ${app}
Log To Console ${android_app_package}
Sleep ${timeout}
: FOR ${i} IN RANGE 2
\ Log To Console Detecting any un-expected windows/errors popup during Open Application. Retrying... ${i+1}/2
\ ${status} ${verify_text}= Run Keyword And Ignore Error Wait Until Page Contains $

————
And here is the bach_profile:

Setting PATH for Python 2.7

The orginal version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"

PATH="/Library/Python/2.7:${PATH}"
export PATHJAVA_HOME=/usr/bin/java
export JAVA_HOME
PYTHON_PATH=/usr/bin
export PYTHON_PATH
export DYLD_LIBRARY_PATH=/Users/vunguyen/imobiledevice-macosx/:$DYLD_LIBRARY_PA$
PATH=${PATH}:/Users/vunguyen/imobiledevice-macosx/

Setting PATH for Python 2.7

The orginal version is saved in .bash_profile.pysave

#PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
PATH="/Library/Python/2.7:${PATH}"
export PATH

ROOT_HOME=$(pwd)

export ANDROID_HOME=$ROOT_HOME/automation/android-sdk-linux
#export PYTHON_PATH="/Library/Python/2.7"
#export PYTHON_PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin"
export JAVA_HOME="Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk"
export PATH=${PATH}:$JAVA_HOME:$PYTHON_PATH
export PATH=$PATH:$HOME/.npm-packages/bin

Setting PATH for Python 2.7

The orginal version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

All the patch are correct ?

Thanks so much,
VuNguyen

On Jun 10, 2015, at 2:17 PM, William Zhang [email protected] wrote:

could you provide more logs?
such as content of /Users/vunguyen/automation/customclient/libs/keywordsLib/customAppKeywords.txt


Reply to this email directly or view it on GitHub #48 (comment).

from robotframework-appiumlibrary.

jollychang avatar jollychang commented on June 18, 2024

is there some specify character ?
as traceback mentioned, it is may be some decode issue.

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)

and how do you run testcase? by pybot ?

from robotframework-appiumlibrary.

rockyav avatar rockyav commented on June 18, 2024

Nope, there is no specify character in the keyword file.
But I’m not sure in lib

Do you check my bah_profile file ?Is it correct ?

"and how do you run testcase? by pybot ?" --> Yes, I ran TC by "pybot" command
Regards,
VuNguyen

On Jun 10, 2015, at 2:47 PM, William Zhang [email protected] wrote:

is there some specify character ?
as traceback mentioned, it is may be some decode issue.

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)

Reply to this email directly or view it on GitHub #48 (comment).

from robotframework-appiumlibrary.

jollychang avatar jollychang commented on June 18, 2024

your bash_profile doesn't show some special

from robotframework-appiumlibrary.

rockyav avatar rockyav commented on June 18, 2024

All the environment are configured OK ?

from robotframework-appiumlibrary.

rockyav avatar rockyav commented on June 18, 2024

Sorry, I'm new QA automation tester here.

from robotframework-appiumlibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.