I got a pretty simple page.  I'm trying testing basic navigations with 
Protractor and running into weird issues.  I'm able to get the element, 
then clicking on the link for the navigation menu but not main welcome area 
even though they both point to the same link.  Appreciate any 
suggestion/hint here.

Thanks,

Stan


====== Protractor Scenarios =================

describe('EndToEnd Testing', function() {

beforeEach(function() {

browser.get('app/');

});

 it('goes to "Add" when clicked', function() {

var link = element(by.css('.jumbotron ul li:nth-child(2)'));

link.getText().then(console.log);

link.click(); 

browser.getLocationAbsUrl().then(function(url) {expect(url.split('#'
)[1]).toBe('/add');}); 

});

 });
====================================

<div class="container">

<nav class="navbar navbar-inverse" role="navigation">

<div class="container-fluid">

 <div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" 
data-target="#navbar" aria-expanded="false"

aria-controls="navbar">

<span class="sr-only">Toggle navigation</span> 

<span class="icon-bar"></span> <span class="icon-bar"></span> 

<span class="icon-bar"></span>

 </button>

<a class="navbar-brand" href="#">Test App</a>

</div>

<!--                      Work           -->

*<div id="navbar" class="navbar-collapse collapse">*

* <ul class="nav navbar-nav">*

* <li class="active"><a href="#/home">Home</a></li>*

* <li><a href="#/list">List</a></li> *

* <li><a href="#/add">Add</a></li>*

* <li><a href="#/update">Update</a></li>*

* </ul>*

*</div>*

 </div>

 </nav>

         *<!--     CLICK() DOESN'T WORK       -->*


* <div class="jumbotron">*

*   <h2>Welcome</h2>*


*   <ul>*

*   <li><a href="#/list" class="input-lg">List</a></li>*


*   <li><a href="#/add" class="input-lg">Add a new query</a></li>*

*   <li><a href="#/update" class="input-lg">Update an existing 
query</a></li>*

*   </ul>*

*   <br>*

*   <p><a class="btn btn-primary btn-lg" href="#/list" 
role="button">Getting Started</a></p>*

* </div>*

</div>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to