Skip to content

Instantly share code, notes, and snippets.

View parthibd's full-sized avatar
💭
Coding marathon.

Parthib Dutta parthibd

💭
Coding marathon.
  • India
View GitHub Profile
// CatInputs.js
import React from 'react';
import PropTypes from 'prop-types';
const CatInputs = ({ idx, catState, handleCatChange }) => {
const catId = `name-${idx}`;
const ageId = `age-${idx}`;
return (
<div key={`cat-${idx}`}>
1551032037714 webdriver::httpapi DEBUG Creating routes
1551032037724 geckodriver DEBUG Listening on 127.0.0.1:63549
1551032040745 webdriver::server DEBUG -> POST /session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts": true, "moz:firefoxOptions": {"args": ["-profile", "C:\\Users\\Parthib\\PycharmProjects\\whatsapp-api\\firefox_profiles\\aaaa"]}}}, "desiredCapabilities": {"browserName": "firefox", "acceptInsecureCerts": true, "webStorageEnabled": true, "databaseEnabled": true, "marionette": true, "moz:firefoxOptions": {"args": ["-profile", "C:\\Users\\Parthib\\PycharmProjects\\whatsapp-api\\firefox_profiles\\aaaa"]}}}
1551032040751 geckodriver::capabilities DEBUG Trying to read firefox version from ini files
1551032040752 geckodriver::capabilities DEBUG Found version 65.0.1
1551032040761 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\Parthib\\PycharmProjects\\whatsapp-api\\fire
@parthibd
parthibd / send.js
Last active June 20, 2018 12:27
Puppeteer code for sending document
public async sendDocument() {
await this.page.bringToFront();
var selector = await this.page.waitForSelector("div[title='New chat']", {visible: true});
await selector.click();
// await driver.page.waitFor(100);
var selector = await this.page.waitForSelector("input[title='Search contacts']", {visible: true});
await this.page.evaluate(() => {
jQuery("input[title='Search contacts']").prop("value", "")
});
await selector.type("xxxxxxxxx");