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

add option to disable replacement of alert funcions #314

Conversation

koichirok
Copy link
Contributor

Summary

Add option to disable replaceAlertMethod so that selenese-runner-java can be used even on sites where replaceAlertMethod does not work properly.

Description

I'm facing an issue where an alert dialog related command fails at one unpublished site.

On this site, JSON.parse failed to convert stringified array back to an array object due to the strange behavior of the JSON.stringify that array always seems to be converted into string twice
(For example, an empty array is converted to a 4 character string "[]" and JSON.parse convert it as 2 character string [])

I tried replacing the implementation of JSON.stringify with another one, but array was still converted incorrectly.

Even for such a case, we can handle the alert dialogs using the *NativeAlert commands as long as we don't replace the alert functions.

This PR adds an option for that.

@koichirok koichirok force-pushed the feature/add-option-disable-replacement-of-alert-funcions branch 2 times, most recently from b696813 to 1e3da3f Compare December 6, 2019 03:57
@koichirok koichirok force-pushed the feature/add-option-disable-replacement-of-alert-funcions branch from 1e3da3f to a8db7f1 Compare December 6, 2019 03:59
@vmi vmi self-assigned this Dec 10, 2019
@vmi vmi merged commit 0b68aec into vmi:master Jan 5, 2020
@vmi
Copy link
Owner

vmi commented Jan 5, 2020

Thank you for PR!

@koichirok koichirok deleted the feature/add-option-disable-replacement-of-alert-funcions branch January 14, 2020 10:17
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

Successfully merging this pull request may close these issues.

2 participants