void OnTriggerStay(Collider playerCollider) { if (canCheck && (!CanBePressed || Input.GetKeyDown(KeyCode.T) || Input.GetMouseButtonDown(0)) && playerCollider.isTrigger && playerCollider.CompareTag("Player")) { if (CanBePressed && CanBePressedAgain && isPressed) { isPressed = false; if (effect) { effect.Reset(); } canCheck = false; } else if (!isPressed) { canCheck = false; isPressed = true; if (effect) { effect.setNeonLine(pressedLineColor, pressedFillColor, pressedLineSize); } } else { return; } foreach (var VARIABLE in targets.SelectMany(t => t.GetComponents <MonoBehaviour>()).OfType <IClickable>()) { VARIABLE.Click(); } } }
//set Paymentfrequency void Paymentfrequency(string paymentfrequency) { DdlPaymentFrequancy.Click(); var lists = Driver.WaitForElementExist(By.XPath("//div[@class='menu transition visible']"), 3) .FindElements(By.TagName("div")); foreach (var VARIABLE in lists) { if (VARIABLE.Text == paymentfrequency) { VARIABLE.Click(); } } }