Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
How can I do validate that a checkbox is selected in KARATE UI testing?
  • def scr = scriptAll('assert(await driver.findElement(By.xpath("//div[5]/div/p-checkbox/div/div[2]/span")).isSelected())')
  • match scr == true

I tried this way but I think logic is wrong.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I have no idea what all that assert / await stuff is for. Karate is NOT Selenium. Please read the documentation: https://github.com/karatelabs/karate/tree/master/karate-core#locators

I think JS should work for you:

* def checked = script('someLocator', '_.checked')
* print 'checked:', checked
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!