본문 바로가기

코딩28

안드로이드 미러링 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.
appium 자동화 2024 - 1) 기본 세팅 (Appium/UiAutomator2/Appium Inspector) * 현재는 Android 기준으로 작성, iOS 세팅 내용 추가 예정Install Appium https://brew.sh/ https://appium.io/docs/en/2.4/quickstart/install 맥 터미널에 입력/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 설치 내용 마지막 쯤에 있는 Next steps 명령어를 복붙해서 실행brew install npmㄴ brew > npm 설치 npm i -g appiumㄴ npm > appium 설치 Install the UiAutomator2 Driverhttps://appium.io/docs/en/2.4/quickstar.. 2024. 2. 20.
2022 자동화 세팅을 차근차근 해보자 3) Appium Inspector 설치 & And 연동 Appium Inspector 설치 & And 연동 지금은 왜인지 Appium과 따로 받아야 하는것 같다. (Appium 1.22.2 기준) https://github.com/appium/appium-inspector/releases 1.22.2 기준으로 Appium Server 실행 후, And 기기연결 (adb devices로 연결 확인) Remote Path > /wd/hub 입력 { "appium:deviceName": "Galaxy A10e", // 기기에서 확인 가능 "appium:udid": "RF9N706DF6L", // adb devices 명령어로 확인 가능 "platformName": "Android", "appium:platformVersion": "10", // 기기에서 확인 가능.. 2022. 3. 13.
2022 자동화 세팅을 차근차근 해보자 2) Mac OS에 실제 Android 기기 연결 1. JAVA 설치 java -version / javac -version > 미설치 확인 https://www.oracle.com/java/technologies/downloads/ > 다운로드 후 설치 vim ~/.bash_profile export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home 입력 후 저장 2. Android SDK 설치 brew cask install android-sdk platform-tools folder 압축풀기 https://developer.android.com/studio/command-line/sdkmanager 여기서 복사해오자 sdkmanager "platform-tools".. 2022. 3. 13.
2022 자동화 세팅을 차근차근 해보자 1) Appium 설치 Appium 설치 1) hoewbrew 설치 https://brew.sh/ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2) node.js 설치 node --version / npm --version > 둘다 미설치 확인 후 brew install node zsh: command not found: brew 오류 발생 시 vi ~/.zshrc export PATH=/opt/homebrew/bin:$PATH 작성 후 ESC > :wq! 입력 source ~/.zshrc 설치 완료 후 node --version / npm --version 으로 설치 확인 3) appium 설치 np.. 2022. 3. 13.
DB 데이터 삭제 (AJAX) 서버랑 통신할 수 있게 도와주는 JS 문법 새로고침 없이 서버랑 통신할수 있음(가장 큰 장점) AJAX 기본 문법 (list.ejs 하단) Server 쪽 기본 틀 (server.js) app.delete('/delete', function(요청, 응답){ DB에서 글 삭제해주쇼 응답.send('삭제완료') }); 삭제 시 화면 내 즉각 반영 두가지 방법 + 성공/실패 시 동작 (list.ejs) $('.delete').click(function(e){ // class 명이 delete 인 요소를 클릭하면 var 글번호 = e.target.dataset.id; // e.target > 지금 클릭한 것 var 지금누른거 = $(this); // this > 지금 이벤트 동작하는 곳 // 지금 누른 값의 d.. 2021. 6. 21.
DB 데이터 인풋 & 아웃풋 a) DB 데이터 인풋 const MongoClient = require('mongodb').MongoClient; var db; MongoClient.connect('mongodb+srv://nt11348:@cluster0.b4ozc.mongodb.net/myFirstDatabase?retryWrites=true&w=majority', { useUnifiedTopology: true }, function(에러, client){ if(에러) return console.log(에러) db = client.db('FrontEnd'); db.collection('feData').insertOne({이름 : 'John', 나이 : 25, _id : 100}, function(에러,결과){ console.log(.. 2021. 6. 21.
node.js 웹서버 설치 1) express 라는 라이브러리를 써서 서버를 만들거임 - new Terminal > npm init > - 어떤 라이브러리 설치했는지 기록하면 좋을듯? package.json 에 기록함 - npm install express - node_modules 가 생성된다 (라이브러리 관련 폴더) - 안되면 npm 대신 yarn 을 써보자 ​ 2) server.js 설정 ​ 기본... const express = require('express'); const app = express(); ​ app.listen(8080, function(){ console.log('listening on 8080'); }); ​ node server.js > 웹서버 ON 컨트롤+C > 웹서버 OFF ​ 위 작업을 자동화하는.. 2021. 6. 21.