Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not logging click on button #52

Open
faqndo97 opened this issue Apr 23, 2022 · 0 comments
Open

Not logging click on button #52

faqndo97 opened this issue Apr 23, 2022 · 0 comments

Comments

@faqndo97
Copy link

Video example:

Screen.Recording.2022-04-23.at.6.15.00.PM.mov

So the problem is that I have a button to only open a modal, and that action is not logged to port into the spec. That button doesn't have value attribute and the property text seems to not exist for buttons, and instead we should use textContent. So I tried all the cases for this code:

if (tagName == "BUTTON" || tagName == "A" || (tagName == "INPUT" && element.type == 'submit')) {
action = "click_on"
target = element.value || element.text
if (!target) {
return;
}
target = "\'" + target.trim().replace("'", "\\\'") + "\'"

Link
Screen Shot 2022-04-23 at 6 22 08 PM

Submit input
Screen Shot 2022-04-23 at 6 22 59 PM

Button
Screen Shot 2022-04-23 at 6 24 17 PM

And seems that the textContent is a better option instead of text that will work in the three scenarios.

What do you think?

I can help to tackle this if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant