Skip to content

Instantly share code, notes, and snippets.

View rafaelcs's full-sized avatar
🏠
Working from home

Rafael Carvalho rafaelcs

🏠
Working from home
View GitHub Profile
@rafaelcs
rafaelcs / appium_log_from_bitrise.log
Last active April 7, 2021 13:29
Appium logs related to the new issue created on https://github.com/appium/appium
[Appium] Welcome to Appium v1.20.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 8273ec32-6b1d-4d25-86fc-e89c86cfd01d
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/Users/vagrant/git/ddata/Build/Products/Debug-iphonesimulator/Verimos.app","noReset":true,"platformVersion":"13.7","automationName":"XCUITest","platformName":"iOS","deviceName":"iPhone 11 Pro Max"},"capabilities":{"firstMatch":[{"appium:app":"/Users/vagrant/git/ddata/Build/Products/Debug-iphonesimulator/Verimos.app","appium:automationName":"XCUITest","appium:deviceName":"iPhone 11 Pro Max","appium:noReset":true,"platformName":"ios","appium:platformVersion":"13.7"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users/vagrant/git/ddata/Build/Products/Debug-iphonesimulator/Verimos.app","noReset":true,"platformVersion":"13.7","automationName":"XCUITest","platformName":"iOS","deviceName":"iPhone 11 Pro Max"},null,{"firstMatch":[{"appium:app
@rafaelcs
rafaelcs / appium_logs.sh
Created August 15, 2019 17:19
appium logs
============================= test session starts ==============================
platform darwin -- Python 3.7.4, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
rootdir: /Users/rafaelcarvalho/Desktop/projects/open-ios/open-test-automation
plugins: allure-pytest-2.7.1
collected 5 items
tests/test_login.py [HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"iOS","appium:platformVersion":"12.4","appium:deviceName":"iPhone X","appium:automationName":"XCUITest","appium:useNewWDA":true,"appium:usePrebuiltWDA":false,"appium:app":"/var/folders/sx/qwd0l4kj15g17_m1p1g1nb7r0000gn/T/__archive__388107363/hashtagopen DEV.xcarchive/Products/Applications/hashtagopen DEV.app"}]},"desiredCapabilities":{"platformName":"iOS","platformVersion":"12.4","deviceName":"iPhone X","automationName":"XCUITest","useNewWDA":true,"usePrebuiltWDA":false,"app":"/var/folders/sx/qwd0l4kj15g17_m1p1g1nb7r0000gn/T/__archive__388107363/hashtagopen DEV.xcarchive/Products/Applications/hashtagopen DEV.app"}}
[debug] [W3C] Cal
@rafaelcs
rafaelcs / settings.json
Created January 12, 2019 16:19
My user settings file to VS Code
{
"editor.fontSize": 14,
"terminal.external.osxExec": "iTerm.app",
"terminal.explorerKind": "external",
"terminal.integrated.fontFamily": "Meslo LG M for Powerline",
"terminal.integrated.fontSize": 12,
"python.pythonPath": "env/bin/python3",
"editor.autoIndent": true,
"workbench.editor.enablePreview": false,
"workbench.settings.openDefaultSettings": false,
@rafaelcs
rafaelcs / buddybuild_postbuild.sh
Created January 11, 2019 05:47
File to integrate UI tests with Appium on Buddybuild
#!/usr/bin/env bash
chruby 2.5.1
echo $'=== Building App for Simulator ==='
APP_ID_FOLDER='/tmp/sandbox/'$BUDDYBUILD_APP_ID'/bbtest'
xcodebuild -project "[your_app_name].xcodeproj" \
-scheme "$BUDDYBUILD_SCHEME" \
@rafaelcs
rafaelcs / conf.js
Last active May 11, 2017 17:11
Protractor conf.js
'use strict';
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
directConnect: true,
specs: ['tests/UI/specs/*.js'],
//seleniumAddress: 'http://localhost:4445/wd/hub',
@rafaelcs
rafaelcs / table.html
Created February 15, 2017 00:51
Apenas a primeira página da tabela
<table id="holder-fee" class="list wide ">
<thead>
<tr>
<th class="header">Name</th>
<th class="header">Category</th>
<th class="header">Charging Unit</th>
<th class="header">Cost</th>
<th class="header">Aditional Cost</th>
<th class="header">Date Modified</th>
@rafaelcs
rafaelcs / fill_form.py
Created November 30, 2016 14:31
Fill form > save infos and assert new values
def update_contacts_form(self):
enter_twitter = "http://" + fake.text(max_nb_chars=13) + "com"
enter_facebook = fake.url()
enter_email = fake.free_email()
enter_phone_cell = fake.phone_number()
enter_home_phone = fake.phone_number()
enter_home_ext_phone = fake.building_number()
enter_work_phone = fake.phone_number()
enter_work_ext_phone = fake.building_number()
Title: Add product for the cart
Type of the Test: Functional Test
Priority: High
Action: After access the product link, click on “add a cart” button
Expected result: Is shown notification on the cart icon and product is added
from selenium import webdriver
from base import Page
from locators import *
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import Select
import os
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"9.2","deviceName":"iPhone 4s","app":"/Users/rafaelcarvalho1santos/Desktop/Projetos/appium-pytest/app/TestApp.app.zip","platformName":"iOS"}}
info: Client User-Agent string: Python-urllib/2.7
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************