Select the first item

How can i check the first checkbox in this situation, i tried using WebUI.check and (Object…) it does not work.

Your help please.


1 Like

Can we see the HTML of the object so we can get more information on it and the “reason” it does not accept a click or check?

Are your “id” attributes dynamic or static? Also, what is the xpath you are using to get to the element?

  • id : attributes static

  • xpath : //*[@id=“message-tree-exploration-table”]/tbody/tr[2]/td[2]/span/input

I can’t confirm the first bit but from the “tr” down it looks correct. Do you know if you have to bring focus to the line first?
Otherwise, all I can suggest is:

import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import org.openqa.selenium.By as By
import org.openqa.selenium.Keys as Keys

WebDriver driver = DriverFactory.getWebDriver();

def box = driver.findElement(By.xpath('//input[@name="j_idt308:0:j_idt335:0:j_idt337"]'));
1 Like

I will try this method dear.

@grylion54 Thank you dear :slight_smile: :slight_smile: