I'm new to using Selenium and I need help with inserting random values into a Send.Key
function within a findElement
. I am currently working with Selenium web driver using Java.
This is the code I have so far:
driver.findElement(By.id("id1")).click();
{
int T;
double M=0;
boolean S = true;
boolean x = false;
double p = 1;
for (T = 0; T == (int) Math.floor(T / 10);)
p = (p + T % 10 * (9 - M++ % 6)) % 11;
//return S?S-1:'k';
alert(x ? p - 1 : 'k');
double alert;
driver.findElement(By.id("id1")).sendKeys(alert);
}
Can someone provide guidance on how to achieve this?