selenium firefox driver python -


i have python functional scripts using selenium 2.32 firefox driver. on html below:

<div id="reminder">   <div>     <ul>       <li>         <strong>text need</strong>       </li>     </ul>   </div> </div> 

i trying css selector search "#reminders div ul li strong". webelement (say assigned variable element) that, when try text (using element.text) empty.

also consistent behavior when debug test, when run whole suite successful , fails, not able find out problem please let me know if has ideas of how proceed.

also running on python 2.7

i going put brief of found out , did solve problem. , pose few questions @ end of explanation of behavior observing. first put pseudo html below

<div id="reminder">   <div>     <ul>       <li>         <strong>text need</strong>       </li>     </ul>   </div> </div> 

the django template have translate above out javascript. use accordian on top of above using

$('#reiminders').accordian({   alwaysopen: false, active: false,collapsible: true,autoheight:false})  

which translates above html

<div id="reminder">   <div class="a few accordian specifc classes" >     <ul>       <li>         <strong>text need</strong>       </li>     </ul>   </div> </div> 

now looks click bind function on accordian mapped inner div accordian class on , not when in script doing css_selector "#reminder" , calling click() on it not opening accordian , hence inner text not being displayed because of "#reminders div ul li strong" selector text giving empty text (i still dont understand why empty whole element might have been hidden still text not empty), once changed click css_selector use '#reminders div' , call click() on it, things started working. able consistently tests passing while debugging.

now questions:

  • i still dont understand why tests pass when run part of suite in ci , fail while fail when run under debug mode on ide

  • i have few tests(7-10) fail when run part of ci, while when rum them locally individually pass, ran tests in same fashion run on ci , lesser number of failures still some(1-2), though when run failing tests individually pass.there can various problems tests dependency might cause on local same tests pass. put out results once sort out.

thanks answers.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -