Topicos Recents
-
Dívida Técnica de Teste de Software
Treinamento e Eventos1 -
Indicações de empresas (in company) - Cursos
Treinamento e Eventos2 -
QA Sênior @ Carenet Longevity (São Paulo)
Vagas1 -
Bate-papo sobre DevOps – Grupo de mentoria Talking About Testing
Feed de Blogs e Posts1 -
[Dúvida] Jira - Plugin para Gerenciamento de Teste
Geral2 -
What is the best fuzzer (automated software testing tool) to find 0-days? Why? Quora Answer
Feed de Blogs e Posts1 -
Tarek - Load testing web services at Mozilla with Molotov | Agile Testers Conference 2018
Treinamento e Eventos1 -
Hacking JavaScript Games - Accessing private javascript variables at runtime via debugging
Feed de Blogs e Posts1 -
Talking About Testing & Patas Dadas
Feed de Blogs e Posts1 -
Agile Testers 2019 News
Geral4 -
Escreva código uma só vez
Feed de Blogs e Posts1 -
Automated tests in a CD/CI pipeline
Feed de Blogs e Posts1 -
How to Practice your JavaScript, Software Testing and Test Automation
Feed de Blogs e Posts1 -
How to Pretty Print JSON using Browser Dev Tools
Feed de Blogs e Posts1 -
How to bypass no paste controls on a web form
Feed de Blogs e Posts1 -
Quais minhas metas para 2019?
Geral8 -
AWS Online Tech Talks 2019
Feed de Blogs e Posts1 -
What does the EvilTester Patreon Contain?
Feed de Blogs e Posts1 -
Analista de Testes Mobile
Vagas1 -
Tendências para a área de Quality Assurance em 2019
Artigos e Tutoriais1
How to bypass no paste controls on a web form
-
Just because a site says we can’t paste into a field, doesn’t mean we have to believe it.
Inspired by this blog post:
dev.to/claireparker/how-to-prevent-pasting-into-input-fields-nn
Clair Parker-Jones shows how to prevent people pasting into input fields. This is common code and you’ll see it on StackOverflow a lot. Claire’s post seemed to receive a lot of flack comments but, people do this and she just wanted to learn how it was done and shared that knowledge. She also put the time into creating a codepen example which you can explore and experiment with.
I forked the example code in here:
https://codepen.io/eviltester/pen/WPpJGo
This is terrible UX pattern but we see it all the time. And as testers we have to work with it, or workaround it.
How to bypass no paste code?
So how do we bypass it?
-
inspect and remove listener in the dev tools
-
with code from the console:
document.getElementById(“paste-no”).onpaste={};
document.getElementById(“paste-no”).onpaste=null;
document.getElementById(“paste-no”).onpaste=new function(){};
If it wasn’t in a frame it would be easy to create a bookmarklet. Creating a bookmarklet can be done, but it is a little bit more complicated than if it wasn’t in a frame. For information on bookmarklets and frames see https://www.irt.org/articles/js170/
Everything in the GUI is ours to observe, interrogate and manipulate. Which is why as testers, the more we understand the technology and the tools, the more we open up possibilities and options in our testing. And we should not limit our testing to the obvious ‘happy’ paths in the GUI.
If you are interested in learning this type of thing then I have an online course:
https://eviltester.com/techwebtest101
I have a follow on exclusive video for Patreons showing another way to bypass the pasting and discussing this in more detail in relation to Software Testing, Risk and Bug & UX Advocacy.
https://www.patreon.com/posts/24482175
Free Video Showing How to Paste into No Paste Fields
https://eviltester.com/2019/02/bypassing-no-paste-fields.html
-