resurrectio icon indicating copy to clipboard operation
resurrectio copied to clipboard

Not recording all event like click, href for links etc

Open ivikash opened this issue 11 years ago • 6 comments

I am facing some problems in using the chrome extension. Firstly not all my events are getting recorded, like the clicks, hrefs for links, and many a times its shows me the few lines and it never reaches to a state to generate the run functions.

Secondly the other issue is, its has casper.start but with casperjs test, instantiating a new env is not required so I think, this can be removed.

Also, I plan to use this with SpookyJs so that I can drive with Node, and it generates codes with selectXpath, which I think isnt available yet in Spooky. bug filed in spooky, so is there any work around for that.

ivikash avatar Dec 07 '13 09:12 ivikash

Regarding your recording problems, if yoy can provide an example (on http://jsfiddle.net/ or anywhere), I will be happy to have a look.

Regarding XPath, there is no workaround for now. Most part of time, we try to use CSS selectors instead of Xpath, but in some cases, XPath is just the best (or only) way to go.

ebrehault avatar Dec 09 '13 22:12 ebrehault

Thanks @ebrehault, I think instead of a jsfiddle it would be easier for me to explain through a 2-min screencast As you can see, I am recording quiet a bunch of events, like screenshots, text, location, clicks etc. but the code generated is not complete and also it never reached to a state to generate the casper.run statement.

Also, before the screencast, I made sure sure that the cache, cookies etc are clear so that its not the memory issues. Along with that, once it did record some clicks in the past, but small thing I could assume was, it doesnot understand the difference between clicks on div and buttons. Moreover how to work with input fields and their focus?

Adding to that, I am not able to drive it through node. I tried to work with SpookyJs but that doesnot support selectXPath and few others as of yet. So do you have any suggestions, how can I achieve a state to generate test conditions from resurrectio and run it from node.

Lastly, if everything works out well, this would be a super awesome chrome extension for front end testing. Awesome effort :+1:

ivikash avatar Dec 12 '13 07:12 ivikash

well my advice is to first try with a simpler scenario that does work, and enrich it step by step to see when the problem occurs

ebrehault avatar Dec 12 '13 10:12 ebrehault

Well, I did try that, and I think it breaks when I start adding test cases for links.

On Thu, Dec 12, 2013 at 3:53 PM, Eric BREHAULT [email protected]:

well my advice is to first try with a simpler scenario that does work, and enrich it step by step to see when the problem occurs

— Reply to this email directly or view it on GitHubhttps://github.com/ebrehault/resurrectio/issues/9#issuecomment-30404416 .

ivikash avatar Dec 12 '13 10:12 ivikash

@ivikash @ebrehault does the text within the link contain any html for example. <a href="http://google.com >Text to click <br> does it include any html like the br here?</a> I'm running into an issue regarding that. The xpath on anchor tags looks at the text inside the anchor tags and the is stripped out instead of escaped on output. I'm wondering if your scenario is similar?

thinkstylestudio avatar Sep 15 '14 20:09 thinkstylestudio

I think i've got the same issue:

here is the html code:

<a href="/sub/param/"><i class="fa fa-wrench"></i><span>Param</span></a>

and here the xpath that is recorded and does not work:

x("//a[normalize-space(text())='Param']")

If the a tag contains only text it's ok but not if it is html.

The correct xpath should be :

$x("//a/span[normalize-space(text())='Param']")

EDIT:

my bad, it works with the master branch as it use a css selector

michelpa avatar Oct 02 '14 20:10 michelpa