Refactored code to improve account and transaction data parsing and management, introducing support for additional fields like card numbers and account statuses. Added new utilities for database connections, device-specific screenshot handling, and XML parsing for enriched account and transaction details.
58 lines
1.1 KiB
C++
58 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include "ScreenXmlParser.h"
|
|
|
|
class CommonScript : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CommonScript(QObject *parent = nullptr);
|
|
|
|
~CommonScript() override;
|
|
|
|
protected:
|
|
virtual void doStart() = 0;
|
|
|
|
// static method
|
|
static bool inputPinCode(const QString &deviceId, const QList<Node> &pincode);
|
|
|
|
bool goToAllProducts();
|
|
|
|
Node swipeToButton(
|
|
const QString &deviceId,
|
|
const QString &text,
|
|
int &counter, int width, int height
|
|
);
|
|
|
|
bool runAppAndGoToHomeScreen();
|
|
|
|
bool tryToCloseAllBannersOnHomePage(
|
|
const QString &deviceId, int width, int height
|
|
);
|
|
|
|
bool readTransactionData();
|
|
|
|
bool m_running = true;
|
|
ScreenXmlParser xmlScreenParser;
|
|
QString m_packageName;
|
|
QString m_pinCode;
|
|
int m_width = 0;
|
|
int m_height = 0;
|
|
|
|
signals:
|
|
void finished();
|
|
|
|
public slots:
|
|
virtual void start() final;
|
|
|
|
virtual void stop() final;
|
|
|
|
private:
|
|
// Q_DISABLE_COPY(CommonScript);
|
|
|
|
bool goToHomeScreen(
|
|
const QString &deviceId, const QString &packageName,
|
|
const QString &pinCode, int width, int height);
|
|
};
|