| Summary: | Add Browser widget support | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] SWTBot | Reporter: | Libor Zoubek <lzoubek> | ||||||||
| Component: | SWTBot | Assignee: | Ketan Padegaonkar <KetanPadegaonkar> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | KetanPadegaonkar | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Libor Zoubek
Created attachment 167125 [details]
SWTBotBrowser widget and WaitForBrowserLoadsPage wait
Can you also attach tests for the widget ? I notice that the WaitForBrowserLoadsPage is not used, what is the purpose of this ? Would it be possible to use it implicitly when users invoke getText() or getURL() ? Curious why you'd want to use a browser's getText() to debug webservices. I tend to use tcpmon for such stuff: https://tcpmon.dev.java.net/ http://wso2.org/blog/saliya/3938 Thanks for your answer! (In reply to comment #2) > Can you also attach tests for the widget ? Yes, I will. Once I get through tests and examples. I'll put BrowserExample into another shell, which appears when tests run. I notice that the > WaitForBrowserLoadsPage is not used, what is the purpose of this ? Sometimes when I write tests using SWTBot, I use some of waits from package org.swtbot.swt.finder.waits directly with waitUntil or waitWhile. Maybe I misunderstood the SWTBot API. Would it be > possible to use it implicitly when users invoke getText() or getURL() ? That think did not came up into my mind. Great idea. > Curious why you'd want to use a browser's getText() to debug webservices. I > tend to use tcpmon for such stuff: > > https://tcpmon.dev.java.net/ > http://wso2.org/blog/saliya/3938 Thanks for suggestion, I've never heard about tcpmon before. But, my tests do not call web services directly, I only need to ensure, that WS gets deployed (endpoint registered), then I call it by servlet which calls client code, which is generated by another wizard. Created attachment 169498 [details]
SWTBotBrowser
Next version of SWTBotBrowser, added tests, integrated wait and authentication, also added Browser into generator's widgets.xml
ping Libor, I see that the browser has its own timeout setting which is different from the rest of SWTBot. Is there a specific reason to do so. I only ask this because it introduces an inconsistency with the rest of swtbot. Are you OK with me removing the get/set timeout() messages ? Libor, I've fixed this change and pushed it out to trunk(svn rev:598, git rev: 7d5bc3) with some cleanups. The timeouts have been removed to use the global timeout instead, to make the browser be consistent with the rest of swtbot widgets. Let me know your thoughts or concerns before I close this issue out. See http://github.com/ketan/swtbot/commit/7d5bc39bd24e018c5c22a8cb41794e83ad3d1272 for the changeset. Created attachment 176571 [details]
mylyn/context/zip
Hi Ketan, thanks for adopting the patch and fixing it. Regarding to timeout - this was the timeout for the server, which is loading the page. I think it would be good to revert it, if you don't mind. Yes, basically we are waiting for a component as it gets into some state, but in this case it is dependent on bandwidth or server resources. It makes sense to me to have the timeout set for this component explicitly. e.g I was not able to pass tests with timeout < 5s in my environment, 'cause eclipse.org is quite slow for me. |