Skip to content

Instantly share code, notes, and snippets.

View yashLadha's full-sized avatar
💻
Learning

Yash Ladha yashLadha

💻
Learning
View GitHub Profile
@yashLadha
yashLadha / [GSoC] [FOSSASIA] Work Product Submission For Badgeyay - yashLadha.md
Last active August 11, 2018 07:04
Work product submission for GSoC 2018 project
@yashLadha
yashLadha / LocalSocketTimeout.md
Last active February 14, 2020 19:04
Local Socket Timeout

Steps to Follow:

  1. Clone the repository
git clone https://github.com/DevExpress/testcafe-browser-provider-browserstack.git
  1. cd into the directory
cd testcafe-browser-provider-browserstack

Linking the plugin manually

Installing the plugin from github (Preffered way)

  1. cd into the project directory and install the package using
npm install --save-dev "DevExpress/testcafe-browser-provider-browserstack#master"
  1. This will update the package.json and will build the package directly from github.
@yashLadha
yashLadha / BrowserStackProvider.md
Created March 4, 2020 09:00
Changelog BrowserStack Provider

BrowserStack Provider

Following changes are made to the browserstack provider:

  1. On Every request from provider there was an explicit sleep introduced in the API call, which degraded the performance. Refactored code around that to improve the performance of provider.
  2. Bug around stopping testcafe session run in JS moded to send STOP two times.
  3. Provider is spawning BrowserStack Tunnel on its own at the startup of session, which add a significant time in starting of session and also gives less control to user around how it's tunnel is configured. Added a flag to provide capability to use same tunnel for different sessions so that significant time can be saved and more control for logging and configuration of binary.
  4. Currently for every capability, there is an associated environment variable. This is not a scalable approach as for every new capability we have to open a PR to add an environment variable related to that. So instead of using environment variable user can provider a path to JSON fi
An unknown server-side error occurred while processing the command.
Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Unsupported origin type
'{ ELEMENT = 5000; "element-6066-11e4-a52e-4f735466cecf" = 5000; }' is set for
'{ duration = 250; origin = { ELEMENT = 5000; "element-6066-11e4-a52e-4f735466cecf" = 5000; };
type = pointerMove; x = 0; y = 0; }' action item.
Supported origin types: ( pointer, viewport ) or an element instance"
UserInfo={NSLocalizedDescription=Unsupported origin type '{ ELEMENT = 5000; "element-6066-11e4-a52e-4f735466cecf" = 5000; }'
is set for '{ duration = 250; origin = { ELEMENT = 5000; "element-6066-11e4-a52e-4f735466cecf" = 5000; };
type = pointerMove; x = 0; y = 0; }' action item.
@yashLadha
yashLadha / TestCafe Test Scheduling.md
Last active May 14, 2020 13:00
Splitting each test

Installing the BrowserStack fork of TestCafe

You can use the browserstack fork of testcafe by executing the following command.

yarn add "https://github.com/browserstack/testcafe.git#session_test_mapping"

Then try running the following command to see if browserstack-provider is present or not.

@yashLadha
yashLadha / native_mutex.js
Last active August 18, 2020 13:36
Native Mutex Implementation in NodeJS
'use strict';
const EventEmitter = require('events');
class NativeLock extends EventEmitter {
lockState = new Map();
constructor() {
super();
this.on('lock', this.handleLockAquire);