Skip to content

Instantly share code, notes, and snippets.

{
const XPATH_FILTER = "//*[contains(text(), '1º piano') or contains(text(), '2º piano') or contains(text(), '3º piano') or contains(text(), 'Piano rialzato')]/ancestor::article[contains(@class, 'item')]";
const result = document.evaluate(XPATH_FILTER, document, null, XPathResult.ANY_TYPE, null);
try {
const nodesToBeRemoved = [];
let node = null;
while (node = result.iterateNext()) {
@aurelienlair
aurelienlair / venue.js
Created May 9, 2021 20:41
Venue page object
class Venue {
urls = {
"Louvre museum": "https://www.musement.com/uk/paris/louvre-museum-v/",
"Eiffel tower": "https://www.musement.com/uk/paris/eiffel-tower-v/",
};
async open(venueName, deviceType) {
opts["capabilities"] = capabilities[deviceType.toLowerCase()];
this.mobileBrowser = await wdio.remote(opts);
await this.mobileBrowser.setTimeout({ pageLoad: 10000 });
async lookForUniqueExperiences() {
const findDuplicates = (arr) =>
arr.filter((item, index) => arr.indexOf(item) !== index);
let activitiesTitle = [];
const activitiesElements = await this.mobileBrowser.$$(
"[data-test=attractionPage__catalogCards-box] [data-test=ActivityCard__title] a"
);
$ appium --allow-insecure chromedriver_autodownload
Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: No Chromedriver
found that can automate Chrome '83.0.4103'. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
@aurelienlair
aurelienlair / install_testcafe.sh
Created June 16, 2020 21:47
Install testcafe with NPM
npm install --save-dev testcafe
@aurelienlair
aurelienlair / composer_require.sh
Last active June 15, 2020 17:45
Composer require security package
composer require security
curl -X GET \
'https://sandbox.musement.com/api/v3/activities?limit=10&city_in=1' \
-H 'Accept-Language: de-DE' \
-H 'Cache-Control: no-cache' \
-H 'X-Musement-Version: 3.4.0' \
-H 'cache-control: no-cache'
curl -X GET \
https://sandbox.musement.com/api/v3/activities/51eb549f-d9cc-4b47-aaef-0f74c5a80cbd \
-H 'Accept-Language: de-DE' \
http://api.spilgames.com/?container=purchase%2F5a6b425d3f57c2086d41cf67&whois=msisdn%2Fe%2Fencrypted%2F524bff0914b670669db2a93e329c8a99&mobile_phone_operator=NL%2FTele2&mobile_phone_number_enc=fa8c9bf3b698f8a30584d7f8c3e47e78&payment_id=00600349990&original_price=200&original_currency=EUR&custom%5Boriginal_price%5D=170&custom%5Boriginal_currency%5D=EUR&timestamp=1516978995&signature=4171bc7d0de7ff49c338d96a21ba6d4f73123aac17bee291b9d1de2e666fb93f
[2017-05-09T12:30:10.410Z]
'full_request' => '
* Server auth using Basic with user \'onebipivr@neomobile.com\'
> GET https://www.onebip.com/bko/subscriber/msisdn/393476232440/subscriptions HTTP/1.1
> [h] Host: www.onebip.com
> [h] Accept: */*
> [h] X-Forwarded-For: 185.42.160.150
> [h] X-Forwarded-Port: 443
> [h] X-Forwarded-Proto: https
> [h] Connection: keep-alive