Skip to content

Instantly share code, notes, and snippets.

View mfaisalkhatri's full-sized avatar
🎯
Focusing

Mohammad Faisal Khatri mfaisalkhatri

🎯
Focusing
View GitHub Profile
@mfaisalkhatri
mfaisalkhatri / Stack_Trace_Failure.txt
Last active October 31, 2017 13:27
"log_level: ERROR" does not capture Error stack trace in logs
[RemoteTestNG] detected TestNG version 6.11.0
Oct 31, 2017 6:48:41 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
[18:48:42.166] [INFO ] - Preparing to perform actions on Android device element [UserName]... (AndroidActivity:63)
[18:48:42.207] [INFO ] - Loading elements on [Android] activity... (DeviceActivity:196)
[18:49:12.373] [INFO ] - Tapping on element [UserName]... (DeviceElementActions:247)
[18:49:16.897] [INFO ] - Clearing element [UserName]... (DeviceElementActions:87)
[18:49:24.959] [INFO ] - Entering text [faisal.khatri@ymail.com] in element [UserName]... (DeviceElementActions:130)
[18:49:32.347] [INFO ] - Preparing to perform actions on Android device... (AndroidActivity:52)
[18:49:32.387] [INFO ] - Capturing screenshot and saving at [F:\Eclipse_Oxygen\WorkSpace\fbTest/screenshots/SCR-20171031-064932.jpeg]... (DeviceActions:175)
@mfaisalkhatri
mfaisalkhatri / Stacktrace.log
Created November 15, 2017 13:48
Stack Trace log of the failed test
[RemoteTestNG] detected TestNG version 6.11.0
2017-11-15 19:14:36:439 - [Appium] Welcome to Appium v1.7.1
2017-11-15 19:14:36:444 - [Appium] Non-default server args:
2017-11-15 19:14:36:445 - [Appium] address: 127.0.0.1
2017-11-15 19:14:36:446 - [Appium] log: F:\Eclipse_Oxygen\WorkSpace\fbTest\logs\server-1.log
2017-11-15 19:14:36:447 - [Appium] logTimestamp: true
2017-11-15 19:14:36:447 - [Appium] localTimezone: true
2017-11-15 19:14:36:448 - [Appium] suppressKillServer: true
2017-11-15 19:14:36:448 - [Appium] defaultCapabilities: {
2017-11-15 19:14:36:449 - [Appium] noReset: false
package com.facebook.test;
import org.openqa.selenium.By;
import com.github.wasiqb.coteafs.appium.android.AndroidActivity;
import com.github.wasiqb.coteafs.appium.android.AndroidDevice;
import com.github.wasiqb.coteafs.appium.device.DeviceElement;
public class SwipeOnElement extends AndroidActivity{
/**
* Copyright (c) 2017, Wasiq Bhamla.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
[18:20:17.907] [ERROR] - com.github.wasiqb.coteafs.error.NotImplementedError: Swipe! Coming Soon!! (ErrorUtils:70)
[18:20:17.907] [ERROR] - at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) (ErrorUtils:73)
[18:20:17.907] [ERROR] - at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at java.lang.reflect.Constructor.newInstance(Constructor.java:423) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at com.github.wasiqb.coteafs.error.util.ErrorUtil.fail(ErrorUtil.java:102) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at com.github.wasiqb.coteafs.error.util.ErrorUtil.fail(ErrorUtil.java:70) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at com.github.wasiqb.coteafs.appium.utils.ErrorUtils.fail(ErrorUtils.java:56) (ErrorUtils:73)
[18:20:17.917] [ERROR] - at com.github.
[18:18:37.920] [INFO ] - Preparing to perform actions on Android device element [UserName]... (AndroidActivity:)
[18:18:37.930] [INFO ] - Loading elements on [Android] activity... (DeviceActivity:)
[18:19:10.706] [INFO ] - Tapping on element [UserName]... (DeviceElementActions:)
[18:19:15.147] [INFO ] - Clearing element [UserName]... (DeviceElementActions:)
[18:19:23.841] [INFO ] - Entering text [faisal.khatri@ymail.com] in element [UserName]... (DeviceElementActions:)
[18:19:30.868] [INFO ] - Preparing to perform actions on Android device... (AndroidActivity:)
[18:19:30.878] [INFO ] - Capturing screenshot and saving at [D:\Github\FacebookAutomationWithAppium/screenshots/SCR-20171212-181930.jpeg]... (DeviceActions:)
[18:19:33.303] [INFO ] - Preparing to perform actions on Android device element [Password]... (AndroidActivity:)
[18:19:34.162] [INFO ] - Tapping on element [Password]... (DeviceElementActions:)
[18:19:38.687] [INFO ] - Clearing element [Password]... (DeviceElementActions:)
@mfaisalkhatri
mfaisalkhatri / PinchAndZoom.java
Created December 27, 2017 16:44
Pinch and Zoom actions performed using Raw Appium
package com.facebook.test;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of [[[[ChromeDriver: chrome on XP (7141249f3c64400ad8680fe5fa4362e7)] -> id: uniform-days]] -> id: days] (tried for 30 second(s) with 500 milliseconds interval)
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T20:55:26'
System info: host: 'FAISALKHATRI', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_212'
Driver info: org.openqa.selenium.support.events.EventFiringWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 75.0.3770.100, chrome: {chromedriverVersion: 75.0.3770.8 (681f24ea911fe7..., userDataDir: C:\Users\ADMIN\AppData\Loca...}, goog:chromeOptions: {debuggerAddress: localhost:62321}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad

Keybase proof

I hereby claim:

  • I am mfaisalkhatri on github.
  • I am faisalk (https://keybase.io/faisalk) on keybase.
  • I have a public key ASBDZoZOSTq6twsdZGrFXrDzRMtEZzKflsDGIylEEH3s1Qo

To claim this, I am signing this object:

@Test
public void testRegisterUser () {
homePage ().openUserRegistrationPage ()
.verifyPageHeader ()
.registerUser ()
.verifySuccessfulRegistration ()
.continueToMyAccount ()
.verifyPageHeader ();
}