Code: Select all
public WebElement FirstNameAfterClick => NewContactPage.FindSingle(
".//iframe[#'contentIFrame0']//input[#'firstname_i']", Global.WaitTime);
public WebElement LastNameAfterClick => NewContactPage.FindSingle(
".//iframe[#'contentIFrame1']//input[#'lastname_i']", Global.WaitTime);
".//iframe[#'contentIFrame0']" in another ".//iframe[#'contentIFrame1']".
I can probably use TryFindSingle() function to check if path exists or not and then use Frame1 or Frame0 but it's too much code. I wonder if I can use Regex or wild card instead of 1 or 0 in IFrame name?
Thanks a lot,
Nik