Closed davidshepherd7 closed 7 years ago
Hi,
To build atoms from source I proceeded like this:
$ git checkout https://github.com/cisco-open-source/selenium.git
$ cd selenium
diff --git a/javascript/chrome-driver/atoms.js b/javascript/chrome-driver/atoms.js
index 969f5ba..19dafa1 100644
--- a/javascript/chrome-driver/atoms.js
+++ b/javascript/chrome-driver/atoms.js
@@ -216,7 +216,7 @@ webdriver.chrome.isElementClickable = function(elem, coord) {
false, 'Element is not clickable at point ' + coordStr);
}
var elemAtPointHTML = elemAtPoint.outerHTML;
atoms.cc
$ ./go //javascript/chrome-driver:atoms
atoms.cc
and atoms.h
are in ./build/javascript/chrome-driver
. Copy them to qtwebdriver/src/third_party/webdriver
and rebuild Qtwebdriver
$ cd selenium
$ export qtwebdriver=/home/hekra01/WD/qtwebdriver/out/desktop/release/Default/WebDriver $ export LD_LIBRARY_PATH=/home//hekra01/qt/lib:$LD_LIBRARY_PATH
$ ./go test_qtwebkit --trace
* The test results are in `build/test_logs`
* The list of all possible tests is in the Readme and in the Rakefile:
./go test_qtwebkit ./go test_wd_native_qt4 ./go test_wd_native_qt5 ./go test_wd_hybrid_qt4 ./go test_wd_hybrid_qt5 ./go test_wd_quick1 ./go test_wd_quick2
* The sources of the tests is in `selenium/java/client/test/org/openqa/selenium/qtwebkit/`
* I modified the atoms in selenium in this [commit](https://github.com/cisco-open-source/qtwebdriver/commit/a70fa15d8f0b176278b6596919497e6f6196537d) for webdriver, this [commit ](https://github.com/cisco-open-source/selenium/commit/66a17f0f3de929822879e76c0ded7ab7392873a6)for selenium, and updated weddriver with the generated cc, since the test results show no regression (or improvement, seems we dont yet test it, TBD later):
Thanks for sorting that out for me, and thanks for explaining everything :+1:
Currently attempting to click on an svg element gives the error:
This is because in the
IS_ELEMENT_CLICKABLE
atom the Javascript code assumes that the svg element has theouterHTML
property but it doesn't. The outerHTML information is only used for improved error reporting so it should be safe to ignore it for svg elements.I guess we shouldn't be hacking on compiled javascript output like this, so if you can point me towards some instructions for making changes and re-compiling I'm happy to do that. Also are there any tests for this stuff?
P.S. it seems unlikely that this will be fixed upstream, there's a long abandoned bug report with no activity, and it appears that modern browsers support calling
outerHTML
on svg elements.