- idles23
- Posts : 1
Join date : 2015-04-14
I can't locate any element in a form under an iFrame with Selenium IDE
Tue Apr 14, 2015 3:38 pm
Hi, I'm new at this forum and I need your help as soon as possible because I'm having lots of troubles with Selenium IDE.
I have to record a script with the IDE in a web application that has lots of iFrames, DIV tags and JavaScript scripts. In my script, all works well until this point:
<tr>
<td>open</td>
<td>my URL</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>An option menu</td>
<td>true</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//html/body/iframe</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>myFrameID</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//html/body</td>
<td></td>
</tr>
So I can select myFrameID and catch the body inside in, but under the <body> tag, I have a <form> and I need to locate a text that are inside a <div> tag in that <form>. But Selenium IDE doesn`t locate anything, neither the <form>.
I hope your answers, thank you and help me please!!
I have to record a script with the IDE in a web application that has lots of iFrames, DIV tags and JavaScript scripts. In my script, all works well until this point:
<tr>
<td>open</td>
<td>my URL</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>An option menu</td>
<td>true</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//html/body/iframe</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>myFrameID</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//html/body</td>
<td></td>
</tr>
So I can select myFrameID and catch the body inside in, but under the <body> tag, I have a <form> and I need to locate a text that are inside a <div> tag in that <form>. But Selenium IDE doesn`t locate anything, neither the <form>.
I hope your answers, thank you and help me please!!
- dwdunning
- Posts : 1
Join date : 2015-04-25
Re: I can't locate any element in a form under an iFrame with Selenium IDE
Sat Apr 25, 2015 5:54 am
I'm new to this myself, but maybe the css locators will help
you can look by ID with the hash symbol #
css=div#exampleID
or by class with a period .
css=div.exampleClass
or by anything in the string with contains
css=div:contains("Text I'm Looking for")
if you have need to narrow down, you can combine these
css=tr:contains("Name") .input
would give you the element with class=input in the same Table Row as the label "Name"
your example might look like
assertElementPresent
css=div:contains("text to locate")
you can look by ID with the hash symbol #
css=div#exampleID
or by class with a period .
css=div.exampleClass
or by anything in the string with contains
css=div:contains("Text I'm Looking for")
if you have need to narrow down, you can combine these
css=tr:contains("Name") .input
would give you the element with class=input in the same Table Row as the label "Name"
your example might look like
Permissions in this forum:
You cannot reply to topics in this forum