Last active
June 12, 2023 16:20
-
-
Save PsyGik/e942a70515e5c3548af6e82639b75f18 to your computer and use it in GitHub Desktop.
Testing Form auto-fills using bookmarklets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { faker } from 'https://cdn.skypack.dev/@faker-js/faker'; | |
const firstName = faker.person.firstName(); | |
const lastName = faker.person.lastName(); | |
const email = faker.internet.email({ firstName, lastName, provider: 'mailinator.com' }); | |
const country = faker.location.countryCode(); | |
const state = faker.location.state(); | |
const pin_code = faker.location.zipCode({state}); | |
document.getElementById("firstName").value = firstName; | |
document.getElementById("lastName").value = lastName; | |
document.getElementById("email").value = email; | |
document.getElementById("address.country").value = country; | |
document.getElementById("address.state").value = state; | |
document.getElementById("address.postal_code").value = pin_code; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment