본문 바로가기

분류 전체보기133

appium Inspector session 끊기지 않도록 설정하기 appium Inspector 는 입력이 없을때 금방 session 이 끊겨서 불편함이 있는데 { "platformName": "Android", "appium:automationName": "uiautomator2", "appium:newCommandTimeout": 600 } 마지막 "appium:newCommandTimeout": 600 요 Capabilities 를 넣어주면 세션 길이를 늘릴 수 있다. (600 입력 시 600초) https://salzzak.tistory.com/95 미국식 의료 개그 만화 1 salzzak.tistory.com 2024. 3. 3.
appium 실행 시, 기기 연결이 안되는 경우 exited with code 1'; Command output: adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device. 위 에러 메시지가 노출되면서 연결이 안되는 경우 안드로이드 기기 > 개발자 옵션 > 기본 USB 구성에서 "파일 전송/Android Auto" 로 기본 설정 되어있을 확률이 높다. 이를 "USB 테더링" 으로 변경해주면, USB 디버깅 허용 얼럿이 뜨면서 정상 연결된다. 이후 adb devices 명령어 실행시, 연결 확인~ https.. 2024. 3. 3.
appium 자동화 2024 - 6) Git 레파지토리 생성 > 로컬 프로젝트 업로드 하기 brew install git 맥 터미널 git 설치 https://github.com/ GitHub: Let’s build from here GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea... github.com 1. github 회원가입 2. 오른쪽 상단 프로필 파일 > Your repositories > New 로 레파지토리 생성 3. 맥 터미널 > 기존에 만들어둔 프로젝트로 위치 후 깃 레파지토.. 2024. 3. 3.
appium 자동화 2024 - 5) 소스 코드 구조화 이전에 짰던 하나의 소스코드를 구조화 import pytest from appium import webdriver from appium.options.android import UiAutomator2Options from selenium.common import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from appium.webdriver import WebElement from selenium.webdriver.support.wait import WebDriverWait # 1. 기다렸다가 클릭하는 함수 wait_Ele.. 2024. 2. 22.
appium-doctor 관련 트러블 슈팅 1. zsh: command not found: appium-doctor 위 에러가 뜨면서 appium-doctor 가 실행되지 않는 현상이 있었다. npm install appium-doctor 로 설치하면 안되고, npm install appium-doctor -g 로 설치해야 정상 작동된다. 2. appium-doctor 실행 시, ANDROID/JAVA_HOME environment variable is NOT set! Android / JAVA_HOME 환경변수가 세팅되지 않았다는 에러가 노출되었었는데, JAVA_HOME 변수 선언시 export 를 안붙여줘서 그랬다. 이슈 재현 JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/H.. 2024. 2. 22.
하루는 토가 히미코를 그려봤다 나의 히어로 아카데미아 , 토가 히미코를 그려봤다 2024. 2. 21.
appium 자동화 2024 - 4) Pytest+appium 자동화 구현 1. Appium 실행 맥 터미널 > appium 앱피움 실행 확인 2. Appium Inspector ㄴ 우선 가장 기본적인 세팅값 설정 후, 하단 Start Session 클릭 ㄴ 미러링이 되며, 각 Element 를 선택할수 있게된다. ㄴ 시계를 실행시키기 위해, 시계 아이콘을 선택하면 위와같이 Element 정보가 노출된다. ㄴ 위에서 xpath 값을 복사해둔다. //android.widget.TextView[@content-desc="시계"] 3. Python 소스코드 앞서 설치 했던 Pytest 테스트 포맷으로 통해 소스코드를 작성한다. 구조화 되기 전 단일 코드로 작성하는 단계 import pytest from appium import webdriver from appium.options.a.. 2024. 2. 21.
안드로이드 미러링 2가지 방법 (안드로이드 스튜디오/scrcpy) 안드로이드 미러링 1. 안드로이드 스튜디오 활용 안드로이드 세팅 > device mirroring 검색 ㄴ Active.. physical.. 선택 ㄴ 안드로이드 우측 하단 Runnung Devices 선택 ㄴ Device Manager > 요 버튼을 눌러보면 미러링 성공 2. brew > scrcpy 활용 맥 터미널 > brew install scrcpy 명령어로 scrcpy 설치 후, adb 설치 된 상태 + 기기 설정 > USB 디버깅 허용 + 유선 연결된 상태라면, 터미널에서 scrcpy 명령어 쳐주면 화면 미러링 된다. https://salzzak.tistory.com/78 생각을 읽는 대머리 학생 1화 salzzak.tistory.com 2024. 2. 21.
appium 자동화 2024 - 3) Pytest 예제 https://docs.pytest.org/en/7.4.x/getting-started.html pip install -U pytest ㄴ 맥 터미널에서 설치 성공 # content of test_sample.py def func(x): return x + 1 def test_answer(): assert func(3) == 5 ㄴ 코드 입력 후 ㄴ pytest 테스트파일.py 명령어로 간단하게 테스트 동작 확인. https://salzzak.tistory.com/95 미국식 의료 개그 만화 1 salzzak.tistory.com 2024. 2. 20.
appium 자동화 2024 - 2) Write the Test(Python/Pytest) 우선 Pycharm 을 설치하고 간단하게 동작하는지도 확인ㄴ 잘 동작한다. https://appium.io/docs/en/2.4/quickstart/test-py/ 위 페이지에 있는 코드를 복붙해보자.# test.py import unittest from appium import webdriver from appium.options.android import UiAutomator2Options from appium.webdriver.common.appiumby import AppiumBy capabilities = dict( platformName='Android', automationName='uiautomator2', deviceName='Android', appPackage='com.android... 2024. 2. 20.