RC2 - how click on "reload" icon?

kevmb1

Пользователь
Регистрация
30.05.2016
Сообщения
36
Благодарностей
2
Баллы
8
Hi,

I want to create C# code to click on reload icon for RC2 Associations



ProjectMaker does not recognize when I click on it.

I tried to use code from CapMonster Wiki where it automatically clicks on the audio icon


Код:
// Searching audio button element
Action TryOpenAudioForm = () => {
    for (int k = 0; k < tryLoadElement; k++)
    {
        var audioButton = tab.FindElementByAttribute("div", "id", "recaptcha-audio-button", "regexp", 0);
        // if found
        if (!audioButton.IsVoid)
        {
            // press button
            audioButton.Click();
            tab.WaitDownloading();
            break;
        }
        System.Threading.Thread.Sleep(waitTime); // pause
        if (k == (tryLoadElement - 1)) timeout = true;
    }
    System.Threading.Thread.Sleep(waitTime); // pause
};
I tried to changed the "id" to "recaptcha-reload-button" - this is actual id of reload button
But it does not work. I also tried using "actions designer" but nothing worked.

How can I make a macro (in C#) that clicks on the reload button?

I am new to programming so please go easy on me.
Thanks in advance!
 

Вложения

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 270
Благодарностей
5 854
Баллы
113
Код:
var noaudio = tab.FindElementByAttribute("div", "id", "recaptcha-reload-button", "regexp", 0);
noaudio.Click();
 

kevmb1

Пользователь
Регистрация
30.05.2016
Сообщения
36
Благодарностей
2
Баллы
8
Ok thanks, I tried that too.

But my project does not want to start when I have that. It says "Project Failed" when I try to restart it.
 

kevmb1

Пользователь
Регистрация
30.05.2016
Сообщения
36
Благодарностей
2
Баллы
8
Nevermind it works now, thank you very much!
 
  • Спасибо
Реакции: VladZen

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)