javascript - Click link in CasperJS with extra spacing in the label -


i'm attempting click download 'button' in following image: enter image description here

as can see in inspector, there spacing in label, doing:

this.clicklabel("download", "a"); 

doesn't work.

i've tried cutting , pasting text html, nature of return character producing parsing error.

any ideas?

update: @artom b.'s duplicate link have potential solution problem, question being asked user not same , difficult find otherwise.

with of @artjom b. came use:

var x = require('casper').selectxpath; casper.click(x("//a[contains(text(), 'download')]")); 

essentially, problem of having trailing characters after "download" overcome searching link contains "download". when utilizing this, weary cause problems if link contains "download" in page.

note: similar duplicate link artjom commented on question, think problem unique , title better related problem.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -