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

246
Views
¿Cómo puedo cronometrar una página de "Pantalla de carga" en Jmeter/Selenium?

Después de cargar un archivo en el sitio web, el sitio web muestra una pantalla de carga. La pantalla de carga está arriba dependiendo del tamaño del archivo. Me gustaría medir la duración de la carga de la página. Soy principiante en jmeter y programación, así que no sé si hay una idea mucho mejor que la que tengo actualmente.

Esto es lo que tengo hasta ahora.

 var node = implicitFind(pkg.By.xpath("//div[id]")); //xpath of the loading screen var increment = 1; while (node != null) { if (increment == 1) var before = new Date().getTime(); //gets current time of test increment++; } var after = new Date().getTime(); WDS.log.info('------- Time taken for loading screen = ' + (after - before) + ' ms'); /* The reason why I added an increment was so the before time can be recorded only on the first loop rather than every loop. The loop ends when xpath no longer exist, which is when the after time is recorded. */

El problema con este código es que jmeter nunca rompe el ciclo, incluso si la condición es falsa. El xpath es de un texto que aparece cuando aparece la pantalla de carga. Por favor, ayuda si hay una mejor manera o si hay una falla en mi código actual. ¡Gracias a todos!

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

0

Es difícil decir qué está mal sin ver el código de la función de implicitFind , es posible que desee volver a visitarlo y verificar la visibilidad o invisibilidad del elemento, es decir, use la función WebElement.isDisplayed()

Más información: The WebDriver Sampler: Sus 10 preguntas principales respondidas

about 4 years ago · Juan Pablo Isaza Report

0

long startTime = System.currentTimeMillis(); driver.get("http://infoall.org"); new WebDriverWait(driver, 10).until(ExpectedConditions.presenceOfElementLocated(By.id("Calculate"))); long endTime = System.currentTimeMillis(); long totalTime = endTime - startTime; System.out.println("Total Page Load Time: " + totalTime + "milliseconds");
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!