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

225
Views
¿Cómo puedo verificar si una casilla de verificación está seleccionada usando TestCafe?
import { Selector } from 'testcafe'; fixture("TestCafe Example") .page("http://devexpress.github.io/testcafe/example"); test("Fill out and submit form", async t => { await t.typeText("#developer-name", "Harun Jonuzi"); //I Want to verify if these Checkboxes are Selected await t .click("#remote-testing") .click("#reusing-js-code") .click("#background-parallel-testing"); await t.click("#macos"); const preferredInterface = Selector("#preferred-interface"); await t .click(preferredInterface) .click(preferredInterface.find("option").withText("JavaScript API")); const submitButton = Selector("#submit-button"); await t .expect(submitButton.hasAttribute("disabled")).notOk(); await t.click(submitButton); const headerInfo = Selector("#article-header"); await t.expect(headerInfo.innerText).eql("Thank you, Harun Jonuzi!"); })

Mi pregunta está comentada en la sexta línea del código como puede verlo. Estoy tratando de averiguar cómo agregar una afirmación para verificar que las casillas de verificación estén realmente marcadas, pero soy nuevo en TestCafe, solo quería ver si puedo obtener ayuda desde aquí.

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

0

Puede usar la propiedad checked del objeto DOMNodeState , por ejemplo:

 await t .click("#remote-testing") .expect(Selector('#remote-testing').checked).eql(true);
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!