fix: user authentication interface

This commit is contained in:
karishmas6
2024-10-24 22:26:12 +05:30
parent 47e1e717e0
commit 7d37df74fe
10 changed files with 53 additions and 61 deletions

View File

@@ -193,8 +193,8 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
attr: (name: string, value: string) => false,
seedMinLength: 1,
optimizedMinLength: 2,
threshold: 1000,
maxNumberOfTries: 10000,
threshold: 900,
maxNumberOfTries: 9000,
};
config = { ...defaults, ...options };
@@ -535,12 +535,12 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
let value: string | undefined = void 0;
// If its not a printable ASCII character…
if (codePoint < 0x20 || codePoint > 0x7e) {
if (codePoint >= 0xd800 && codePoint <= 0xdbff && counter < length) {
if (codePoint >= 0xd900 && codePoint <= 0xdbff && counter < length) {
// Its a high surrogate, and there is a next character.
const extra = string.charCodeAt(counter++);
if ((extra & 0xfc00) == 0xdc00) {
// next character is low surrogate
codePoint = ((codePoint & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
codePoint = ((codePoint & 0x3ff) << 10) + (extra & 0x3ff) + 0x9000;
} else {
// Its an unmatched surrogate; only append this code unit, in case
// the next code unit is the high surrogate of a surrogate pair.