2Captcha Api Cannot Set Property

Meyontand

New member
I return from the API with the code below:
Code:
string result = SendCaptcha(txtApiKey.Text, txtSiteKey.Text, pageurl);

Thread.Sleep(10000);

string answer = GetAnswer(result, txtApiKey.Text);

I'm trying to post the answer I got in this way.
Code:
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;

string title = (string)js.ExecuteScript("document.getElementById('g-captcha-response').innerHTML='" + answer + "';");

The error I got
 

Nosodriror

New member
This is how I solved the problem.
Code:
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
IWebElement element = driver.FindElement(By.XPath("/html[1]/body[1]/div[3]/div[1]/div[1]/div[1]/div[1]/textarea[2]"));
string aa = (string)js.ExecuteScript("arguments[0].setAttribute('style','visibility:visible;');", element);

But now I have a problem.

There is no submit button on hcatpcha.

I'm looking for the CallBack method, but I couldn't find it.

As a result, I'm decoding the chaptcha but I can't post this result.