I have a 0.
0
I try to write a test that myDiv has 0 text in it. With WebDriver it is:
It sounds like you are using HTMLUnitDriver. In that case you would need to enable the JavaScript code like below.
HtmlUnitDriver driver = new HtmlUnitDriver(); driver.setJavascriptEnabled(true);
Check out the documentation here.