mardi 18 août 2015

Robot Framework cant find the element

I have a Robot Framework test which uses Selenium2Library to work with a web-based user interface. I fill out and submit a form which contains just 4 textarea. Submitted data will be shown in a table under the form and whenever I click on a row, its data will be exported to the form for editing. I use this feature to confirm data submission. But when I click on the row and the data is exported to the form, Robot Framework cant find text-boxes except the first one, even though the source of the page shows that all of them are located in the HTML content. This is part of my code which is trying to check contents of text-areas:

run keyword     textfield value should be   id=${sponsorName}   ${name}     Sponsor name does not match the expected one: ${name}
run keyword if  '${contactInfo}' != '${EMPTY}'  textfield value should be   id=${sponsorContactInfo}    ${contactInfo}  Sponsor Contact Information does not match the expected one: ${contactInfo}
run keyword if  '${description}' != '${EMPTY}'  textfield value should be   id=${sponsorDescription}    ${description}  Sponsor Description does not match the expected one: ${description}
run keyword if  '${email}' != '${EMPTY}'        textfield value should be   id=${sponsorEmail}          ${email}        Sponsor Email does not match the expected one: ${email}

Method textfield value should be returns False. I put a break-point into this method to check what is the actual source of the problem and it turned out that the library cant find the element to check its content.

Aucun commentaire:

Enregistrer un commentaire