Reputation: 4047
I am using Dalek to automate test my webpage. The webpage makes a jQuery ajax API call and gets a JSON object in return. I use an attribute of that object to display data on my webpage.
When I try to run the test, it always fails and shows that no value was detected in that particular div with id name even though the name is being displayed.
Dalek Test:
test .open('http://localhost:3000/details.html?id=4')
.wait(2000)
.assert.title().is('User Details', 'User Details Displayed')
.assert.text('#username').is('Karianne','')
.done();
Result:
What is the reason behind this? Does PhantomJS doesn't execute jQuery?
Upvotes: 0
Views: 34
Reputation: 11
Try to use a screenshot feature to see what is going on when the page loads:
.assert.text('#username').is('Karianne','')
.screenshot('/tmp/localhost_3000:datetime.png')
Upvotes: 1