@Keyword
def waitLocationDisplay(TestObject to, int timeout){
WebDriver driver = DriverFactory.getWebDriver()
WebDriverWait wait = new WebDriverWait(driver, 30)
//
//
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)))
}
i create a parameter TestObject " to", i want to get to's xpath ,how
Hi @1018742342
Please refer to the accepted answer of this post:
can i use js to submit form
@Keyword
def clickJquery(){
WebDriver driver = DriverFactory.getWebDriver()
String js = "var checkoutNowForm = $('#CheckoutNowForm'); var selectedPaymentType= $(':input[name=selectedPaymentType]:checked').val();checkoutNowForm.find('#selectedPaymentType').val(selectedPaymentType);var selectedShippingType= $(':input[name=selectedShippingType]:checked').val();checkoutNowForm.find('#selectedShippingType').val(selectedShippingType);checkoutNowForm.submit();"
driver.execute_script(js)
}
like this
Yes, you can, provided the javascript is correct.
Hi @1018742342
Try to wrap the string with triple quotes instead of double quotes.
