def links = driver.find_elements(By.LINK_TEXT, 'Submit') not working (transferring the test case from python into katalon work there in selenium with python)
getting all the links with this with name Submit
groovy.lang.MissingPropertyException: No such property: driver for class: Script1615503258213
Any library to import ?
Sorry, but do you want all the links or only the one indicated by the red “arrow”? If you want only the one, how about using the below style, which KS supports :
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import org.openqa.selenium.By as By
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
WebDriver driver = DriverFactory.getWebDriver();
pLabel = driver.findElement(By.xpath('//a[text()="Submit"]'))
or if you want to get it via the table and then cycle through it for your specific row:
'To locate table'
WebElement Table = driver.findElement(By.xpath("//table/tbody"));
'To locate rows of table it will Capture all the rows available in the table'
List<WebElement> rows_table = Table.findElements(By.tagName('tr'));