Add inner_html and inner_html= methods #299

wants to merge 1 commit into


None yet
5 participants

I just add 2 methods to get the "innerHTML" of a node and to update it:

node.base.inner_html                                    # return the innerHTML of the node
node.base.inner_html = "<b>hello</b> world!" # update the innerHTML



jferris commented Mar 23, 2012

Thanks for the patch. This looks neat, but we don't pull anything in without tests. Can you please add tests for this?


jferris commented Apr 3, 2012

I'm closing this, but feel free to open a new pull request with tests.

jferris closed this Apr 3, 2012


carloslopes commented Sep 15, 2012

@jferris Was this already done by other pull request?

Because, if it's still waiting for tests, i think i can work to make it done.

/cc @wooandoo


mhoran commented Sep 17, 2012

@carloslopes, this has not been done. We'd gladly merge a pull request with tests.


carloslopes commented Sep 22, 2012

@mhoran i'm having a problem when rebuild the gem to do the tests..

i made the spec and it fails, after this i made the code to the text pass, but it didn't pass.

i thought that the problem was with my code, but, i forced other test to fail (changing the code inside the capybara.js file) and it keep passing.

so, i think that every change i made in the capybara.js file i need to rebuild the gem to run the tests. am i right?

but, when i tried to rebuild the gem, i got this:

Text file busy - bin/webkit_server

Am i doing something wrong?

I'm using ruby 1.9.3-p194 on a linux machine


mhoran commented Sep 23, 2012

@carloslopes, looks like the server is still running for some reason. You should be able to kill it, and then compile. If, for example, a former spec run resulted in a segfault, the server can be left running, which leads to the above error message.

dfl commented Sep 25, 2012

+1 this is just what I need. thanks for writing the necessary tests!


carloslopes commented Sep 26, 2012

It's done!

Here is the pull request: #394

@mhoran yes man, what you told me works. Every time i run my tests i need to rebuild the gem, and to do this, i need to force kill the webkit-server processes. I don't know why this is happening. Is there a known issue related to this? If you prefer, i can open a new issue here in the tracker


mhoran commented Sep 28, 2012

@carloslopes, webkit_server should get killed at the end of a spec run. It usually does for me. However, there are times when the server may hang, in which case it won't die. There may be a bug in there, but seeing as I can't reproduce it, I don't think there's anything we can do right now.

Thanks for the pull!


carloslopes commented Sep 28, 2012

@mhoran ok, thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment