I’m using the library FakerLibrary in the portuguese version.
When generating CPF it brings CPF with mask example: 109.694.257-94 but I wanted to remove the mask in the CPF generated. Example of how to generate 10969425794. How do I remove the mask?
Result:
Code:
i*** Settings ***
Documentation Documentação da API: xxxxxxxxx
Library RequestsLibrary
Library Collections
Library FakerLibrary locale=pt_BR
Library String
*** Variable ***
${URL_API} local/api/profile/user
*** Keywords ***
####SETUP E TEARDOWNS
Conectar a minha API
Create Session fakeAPI ${URL_API}
${HEADERS} Create Dictionary content-type=application/json
Set Suite Variable ${HEADERS}
Cadastrar um novo cliente
${NOME} FakerLibrary.name
${CPF} FakerLibrary.CPF
${EMAILFAKE} FakerLibrary.Email
${TELEFONE} Generate Random String length=11 chars=[NUMBERS]
${RESPOSTA} Post Request fakeAPI create
... data={"email": "${EMAILFAKE}","gender":"M","cpf":"${CPF}","name": "${NOME}", "password": "Code147@","role":"CLIENT", "telephone": "${TELEFONE}"}
... headers=${HEADERS}
Log ${RESPOSTA.text}
Set Test Variable ${RESPOSTA}