RC2 - how click on "reload" icon?

  • Автор темы Автор темы kevmb1
  • Дата начала Дата начала

kevmb1

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

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

13515-d78ab7d275f04b4c725042d890d04c69.jpg


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
13516-40fce455cc1585e5883284c5bc99b955.jpg


Код:
Развернуть Свернуть Копировать
// 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!
 

Вложения

  • Screenshot_1.png
    Screenshot_1.png
    16,9 KB · Просмотры: 410
  • Screenshot_4.png
    Screenshot_4.png
    2,5 KB · Просмотры: 426
Код:
Развернуть Свернуть Копировать
var noaudio = tab.FindElementByAttribute("div", "id", "recaptcha-reload-button", "regexp", 0);
noaudio.Click();
 
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.
 
Nevermind it works now, thank you very much!
 
  • Спасибо
Реакции: VladZen

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