Adjust "Перевести" button tap position in PayByPhoneScript to the lower part of the button, avoiding the "за друга" badge. Update debug logs accordingly.
This commit is contained in:
parent
f696e816e2
commit
01190bfa69
@ -574,16 +574,23 @@ bool AdbUtils::enableAdbIMEKeyboard(const QString &deviceId) {
|
||||
bool AdbUtils::inputAdbIMEText(const QString &deviceId, const QString &text) {
|
||||
QProcess process;
|
||||
process.setWorkingDirectory(adbDir());
|
||||
|
||||
// Кодируем UTF-8 → base64 и шлём через ADB_INPUT_B64. Это исключает любые проблемы
|
||||
// shell-кавычек на устройстве с пробелами, скобками и не-ASCII символами
|
||||
// (типа "Озон Банк (Ozon)"). ADBKeyboard декодирует base64 и вызывает commitText.
|
||||
const QString b64 = QString::fromLatin1(text.toUtf8().toBase64());
|
||||
|
||||
process.start(adbPath(), {
|
||||
"-s", deviceId,
|
||||
"shell", "am broadcast -a ADB_INPUT_TEXT --es msg '" + text + "'"
|
||||
"shell", "am broadcast -a ADB_INPUT_B64 --es msg " + b64
|
||||
});
|
||||
if (!process.waitForStarted(5000)) {
|
||||
qWarning() << "[AdbUtils] Failed to start adb broadcast:" << process.errorString();
|
||||
return false;
|
||||
}
|
||||
process.waitForFinished();
|
||||
qDebug() << "[AdbUtils] inputAdbIMEText result:" << process.exitCode()
|
||||
qDebug() << "[AdbUtils] inputAdbIMEText (b64) result:" << process.exitCode()
|
||||
<< "text:" << text
|
||||
<< "output:" << process.readAllStandardOutput().trimmed()
|
||||
<< "error:" << process.readAllStandardError().trimmed();
|
||||
return process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0;
|
||||
|
||||
@ -344,6 +344,15 @@ void PayByPhoneScript::makePayment(
|
||||
|
||||
// Вариант 2: уже на экране поиска банка (EditText) — только после клика на "Другой банк"
|
||||
if (otherBankClicked) {
|
||||
// После перехода на экран поиска банка поле ввода прячется под верхним
|
||||
// тулбаром (рендерится Svelte WebView'ом). Свайпаем сверху вниз, чтобы
|
||||
// подтянуть содержимое и сделать поле физически видимым/активным.
|
||||
qDebug() << "[PayByPhone] Scrolling up to reveal hidden bank search input...";
|
||||
AdbUtils::makeSwipe(deviceId, width / 2, height / 4, width / 2, height * 3 / 4);
|
||||
QThread::msleep(800);
|
||||
xmlScreenParser.parseAndSaveXml(AdbUtils::getScreenDumpAsXml(deviceId, ++m_counter));
|
||||
closeGooglePlayBannerIfVisible(deviceId, width, height);
|
||||
|
||||
Node bankInput = xmlScreenParser.findFirstEditText();
|
||||
if (!bankInput.isEmpty()) {
|
||||
qDebug() << "[PayByPhone] Bank search screen detected, entering bank name...";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user