Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
idles23
Posts : 1
Join date : 2015-04-14

I can't locate any element in a form under an iFrame with Selenium IDE Empty 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!!
avatar
dwdunning
Posts : 1
Join date : 2015-04-25

I can't locate any element in a form under an iFrame with Selenium IDE Empty 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")

Back to top
Permissions in this forum:
You cannot reply to topics in this forum