Question

Good Morning All,

I'm doing some web automation testing using WebAii ArtOfTest. It's similar to Watin. Anyways, I'm trying to find a label element by its for attribute. Using the jQuery validation plug in, a label element is added dynamically to store the error message for a textbox. No id is given to the element, just a class and the for attribute. I'm using WebAii to search by attribute for=textBoxMileage. I'm guessing the element is not found because it's added on document.ready and WebAii may begin looking for it prior to that event. Anyways, does anyone know how I can properly look for and find the desired element? Thanks so much for any help or tips.

Cheers,
~ck in San Diego

Was it helpful?

Solution

My team and I were able to figure this out. Running the waitForReady() method against the current browser object allows the jQuery document.ready function to run and set up the page accordingly. The elements were easily located after this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top