-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
I'd like to clarify several ZTL related issues:
1. What's the official ZTL home page?
a) http://code.google.com/p/zk-ztl/
or
b) https://github.com/zkoss/ztl
2. What's the official ZTL issue tracker:
a) Jira - http://tracker.zkoss.org/browse/ZTL
or
b) GitHub issue page - https://github.com/zkoss/ztl/issues
3. Can I somehow record ZK UI actions via Selenium to automate this routine process?
4. What's the official ZTL related communication channel? (I guess this forum :-)
Hi All,
Let me clarify the confusion for you
1. What's the official ZTL home page?
http://www.zkoss.org/product/ztl
2. What's the official ZTL issue tracker:
Jira - http://tracker.zkoss.org/browse/ZTL
3. What's the differences between the two source code repositories.
* ZTL 1.0.0 (with our own vision test) for Selenium RC
- http://code.google.com/p/zk-ztl/
* ZTL 2.0.0 for Selenium Web driver
- https://github.com/zkoss/ztl/
The reason we keep both repositories is that the Selenium Web driver does not support the vision test well,
and currently the web driver version is not stable for all of the browsers. But for ZK app developer they can choose which version is suitable to their requirement.
In ZK framework development environment, we use two repositories at the same time, ZTL 1.0.0 for our vision test and ZTL 2.0.0 for our function test.
That means we have to change selenium-server (2.x) source code?
I tried before to use the official selenium web driver API, but in IE it will snapshot the different scene from the original screen that is the reason I went back to use the ZTL 1.0.0 version.
And the selenium web driver doesn't support Safari browser yet. From the functional-wise the vision test in ZTL 1.0.0 is more power than that Selenium 2.x provided.
If you can solve those issues for us that would be great. :D
I'm using Selenium 2.7 and corresponding IE Web Driver. I made some fixes in ZTL so captureScreenshot works fine with IE.
You could see https://github.com/crc83/ztl/commit/67896fe35ffed40096e4e7ce96eeb048bda5cd2e
file : ztl/ztl/src/main/java/org/zkoss/ztl/ZKTestCase.java
public void captureScreenshot(String filename) { try { if (isIE()) { File screenshot = ((InternetExplorerDriver) getWebDriver()).getScreenshotAs(OutputType.FILE); File dest = new File(filename); if (dest.exists()) { dest.delete(); } screenshot.renameTo(dest); } else { getCurrent().captureScreenshot(filename); } System.err.println("Saved screenshot " + filename); } catch (Exception e) { System.err.println("Couldn't save screenshot " + filename + ": " + e.getMessage()); e.printStackTrace(); } }
Asked: 2011-10-04 07:17:40 +0800
Seen: 2,133 times
Last updated: Aug 01 '12