I try catching the html form to fill it out.
Here is the target html source.
<span class="login-id">
<div id="LoginId">
<input maxlength="100" name="uji.model.635939.value">
<input type="hidden" name="uji.model" value="uji.model.635939">
<input type="hidden" name="uji.model.635939" value="com.fujitsu.uji.compo.taglib.FieldStringUpdater;vkaiinNinshoID">
</div>
<span class="example">(半角英数字)</span>
</span>
I focus on <input maxlength="100" name="uji.model.635939.value"> .
And the number 635949 is changed when I connect every time.
And here is my code. I used for to handle multiple cases.
for (int i = 600000; i < 699999; i++)
{
string s = i.ToString();
try
{
IWebElement id = driver.FindElement(By.Name(String.Format("uji.model.{0}.value", s)));
id.SendKeys("******@gmail.com");
}
catch(OpenQA.Selenium.NoSuchElementException e)
{
Console.WriteLine("exception {0}", s);
}
}
I wonder my code is correct. I'm not sure(By.Name(String.Format("uji.model.{0}.value", s) is correct.
BTW, maxlength="100" is the unique expression in the html source.
Is there any way to fill out the form using this? Thank you for reading.
(?<!\d)\d{6}(?!\d)instead of looping and findingdriver.FindElement(By.cssSelector("input[name^='uji.model.']")).SendKeys("your_Text");?