watin-development Mailing List for WatiN
Brought to you by:
jvmenen
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(23) |
Sep
(21) |
Oct
(12) |
Nov
(16) |
Dec
(8) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(38) |
Feb
(52) |
Mar
(54) |
Apr
(16) |
May
(18) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(22) |
Oct
(29) |
Nov
(35) |
Dec
(5) |
| 2008 |
Jan
|
Feb
(9) |
Mar
(11) |
Apr
(1) |
May
(10) |
Jun
(6) |
Jul
|
Aug
(8) |
Sep
(5) |
Oct
(1) |
Nov
(3) |
Dec
|
| 2009 |
Jan
(5) |
Feb
(6) |
Mar
(15) |
Apr
(19) |
May
(4) |
Jun
(45) |
Jul
(74) |
Aug
(51) |
Sep
(41) |
Oct
(30) |
Nov
(62) |
Dec
(34) |
| 2010 |
Jan
(27) |
Feb
(8) |
Mar
(16) |
Apr
(13) |
May
(7) |
Jun
(6) |
Jul
(4) |
Aug
(25) |
Sep
(9) |
Oct
(11) |
Nov
(8) |
Dec
(9) |
| 2011 |
Jan
(13) |
Feb
(1) |
Mar
(6) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(2) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
| 2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2015 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: jignesh d. <jig...@ya...> - 2015-01-30 12:44:28
|
Hi,
What's the problem with this code. ?
using (var browser = new IE("http://www.hotmail.com"))
{
var a = Find.ByName("login"); browser.TextField(a).TypeText(ab...@ho...);}
Throws error, that element by name not found. where as using inspect element I found the following on Hotmail page.
[input name="login" class="ltr_override" id="i0116" aria-describedby="idTd_Tile_Error idTd_PWD_Error" aria-labelledby="idLbl_PWD_Username" lang="en" type="email" maxlength="113"]
Any Advice.
Regards
|
|
From: jignesh d. <jig...@ya...> - 2015-01-30 11:42:36
|
Hi, I today tried a very simple example given on homepage. I realized that below statement creates new instance of IE browserand browser is visible and it shows steps wise, what string is being sent to browser. var browser = new IE(http://www.google.com) Can I hide the browser ? such that everything happens in background. Regards |
|
From: <bo...@vo...> - 2014-12-18 10:57:10
|
Hi,
I use the css selectors feauture of Watin a lot. So I have recently updated the Sizzle implementation in Watin with new version. Togoether with IE11 I found some issues on Ajax driven pages (successive calls to css selectors not working).
Though it was a bit hard to find the exact reason, it turns out to be related to IE 11 caching.
If anyone is using the css selectors with IE 11 and is facing some problems, consider this update:
WatiN-2.1.0.1196/source/src/Core/Native/InternetExplorer/IEUtils.cs
73,74c73,76
< Logger.LogDebug("[script] {0}", scriptCode);
< window.execScript(scriptCode, language);
---
> Logger.LogDebug("[script-start] {0}", scriptCode);
> object scriptLanguage = language;
> int res = window.setTimeout(scriptCode, 0, ref scriptLanguage);
> Logger.LogDebug("[script-end] {0}{1}", scriptCode,res);
(execScript is marked as obsolete in IE11 although it works fine as I can tell)
WatiN-2.1.0.1196/source/src/Core/Native/InternetExplorer/IEElementCollection.cs
21a22,24
> using System.Diagnostics;
> using System.Globalization;
> using System.Threading;
86c89,90
< domContainer.RunScript(new ScriptLoader().GetSizzleInstallScript());
---
> var mark = Guid.NewGuid().ToString("N");
> //domContainer.RunScript(new ScriptLoader().GetSizzleInstallScript());
93a98,103
> var code = new ScriptLoader().GetSizzleInstallScript() + "; " + string.Format(CultureInfo.InvariantCulture,"document.___WRR{2} = false; document.___W{2} = Sizzle('{0}', {1}); document.___WRR{2} = true;", selector, container, mark);
> domContainer.RunScript(code);
>
> WaitForTrue(() => ResultReady(domContainer, "___WRR" + mark), 200, 3000, new AutoResetEvent(false));
> return new JScriptElementArrayEnumerator((IEDocument)domContainer.NativeDocument, "___W" + mark);
> }
95,96c105,133
< var code = string.Format("document.___WATINRESULT = Sizzle('{0}', {1});", selector, container);
< domContainer.RunScript(code);
---
> static void WaitForTrue(Func<bool> test, int interval, int timeout, AutoResetEvent resetEvent)
> {
> if (resetEvent == null)
> {
> resetEvent = new AutoResetEvent(false);
> }
>
> TimeSpan waitInterval = TimeSpan.FromMilliseconds(interval);
> Stopwatch watch = new Stopwatch();
>
> bool interrupted = false;
> watch.Start();
> while (watch.ElapsedMilliseconds <= timeout && !test.Invoke() && !interrupted)
> {
> interrupted = resetEvent.WaitOne(waitInterval);
> }
>
> watch.Stop();
> }
>
> private static bool ResultReady(DomContainer domContainer, string element)
> {
> IEDocument nativeDocument = (IEDocument) domContainer.NativeDocument;
> Expando expando = new Expando(nativeDocument.HtmlDocument);
> object value = expando.GetValue(element);
> if (value == null)
> {
> return false;
> }
98c135
< return new JScriptElementArrayEnumerator((IEDocument) domContainer.NativeDocument, "___WATINRESULT");
---
> return (bool)value;
(different watin result document property for each call prevents any caching on IE side)
Apply at your own risk :).
Have a nice day, Robert
|
|
From: Dinis C. <din...@ow...> - 2014-12-15 06:55:45
|
Hi, is there an official Github Repo for Watin? Dinis |
|
From: Dinis C. <din...@ow...> - 2014-08-17 12:35:34
|
Hi as you can see at: * http://blog.diniscruz.com/2013/03/packaging-o2-platform-script-as-stand.html * http://blog.diniscruz.com/search/label/WatiN * http://o2platform.wordpress.com/category/ie-automation/watin/ * https://www.nuget.org/packages/FluentSharp.WatiN/ * https://www.nuget.org/packages/FluentSharp.WatiN.NUnit/ * https://github.com/o2platform/FluentSharp_Fork.WatiN I've been using WatiN a LOT in the O2Platform and FluentSharp projects, where I created a large number of ExtensionMethods that make WatiN really easy to use (see https://github.com/o2platform/FluentSharp_Fork.WatiN/tree/master/FluentSharp.WatiN/ExtensionMethods ) I used WatiN because It really worked much better than Selenium (specially because I was able to run it inside an embedded IE instance). I would like to connect with the WatiN developers and see if it is possible to contribute some of these ideas and methods into the main WatiN Codebase. One thing I noticed is that the development pace of WatiN seems to have slowed down. Can you point me to the current development plans and focus? Thanks for creating such a great API, and let me know how to help Dinis |
|
From: <bo...@vo...> - 2014-07-24 08:55:39
|
Hi, if anyone is experiencing problems with WatiN in 64b process I may have a hint. I am using Watin on x64 and it caused me some troubles, especially when switching to IE11. I have recently reviewed the source code of Watin and it seems the PInvoke calls are flawed (working only on 32b system correctly). If you execute certain methods they overwrite some parts of memory (as 32b is reserved for 64b result) thus making strange errors. This is just an example one: WatiN-2.1.0.1196/source/src/Core/Native/Windows/Win32.cs public static extern Int32 SendMessageTimeout(IntPtr hWnd, Int32 msg, Int32 wParam, Int32 lParam, Int32 fuFlags, Int32 uTimeout, ref Int32 lpdwResult); VS correct public static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam, uint fuFlags, uint uTimeout, out IntPtr lResult); For full change check http://pastebin.com/KaVpM6wT It needs a rebuild of the Watin.Core dll of course and comes with no warranty. Also if you want to use WatiN with IE11 you should update the Sizzle script (http://sizzlejs.com/) in WatiN-2.1.0.1196/source/src/Core/Properties/Resources.resx and rebuild. Have a nice day, Robert |
|
From: Sadiq M. <sad...@gm...> - 2014-04-29 06:42:36
|
can you please provide some sample code .......
On 23 April 2014 23:50, Daaron Dwyer <da...@gm...> wrote:
> Your code isn't as important as the javascript on the target page. You
> need to intercept the item blocking. For instance, you can intercept an
> alert with something like:
> RunScript("window.alert(){}");
> You can use the same thing on window.open or whatever might be blocking.
>
>
> On Wed, Apr 23, 2014 at 7:54 AM, Sadiq Merchant <sad...@gm...>wrote:
>
>> it is very helpful if you provide some demo code.
>>
>>
>> On 23 April 2014 18:23, Sadiq Merchant <sad...@gm...> wrote:
>>
>>> Thanks for your reply.
>>>
>>> Please find attached file of Browser Handler code.
>>>
>>> I ll explain you the flow of project.
>>>
>>> 1. we are automatically login using provided login details.
>>>
>>> 2. check for credit.click type of website.
>>>
>>> 3. after getting many website link click on by one on that link and earn
>>> credit.
>>>
>>> 4. the problem we are facing is after earning the credit the used link
>>> should be automatically closed and delete and click on another website link.
>>>
>>> 5. but when closing some websites it gives us popup and because of that
>>> popup our application got crashed.
>>>
>>> 6. so we need to prevent or handle this popup automatically. so our
>>> application does not crashed.
>>>
>>> Please provide us the solution for the same.
>>>
>>> Thank you.
>>>
>>>
>>>
>>> On 23 April 2014 17:48, Daaron Dwyer <da...@gm...> wrote:
>>>
>>>> The simplest way is to override the javascript, setting the event to do
>>>> nothing. If you can post a code sample, I can be more specific.
>>>> On Apr 23, 2014 2:15 AM, "Sadiq Merchant" <sad...@gm...> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> We are developing one application using watin,The problem we are
>>>>> facing is we are not able to handle popup which is closing on browser,So
>>>>> please provide us the solution for the handling popup automatically so we
>>>>> can overcome the issue.
>>>>>
>>>>> Thank you
>>>>>
>>>>> --
>>>>>
>>>>> *Regards,Sadik Merchant*
>>>>> *Mobile : +91-8087299269 <%2B91-8087299269>*
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>> _______________________________________________
>>>>> Watin-development mailing list
>>>>> Wat...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/watin-development
>>>>>
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Watin-development mailing list
>>>> Wat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/watin-development
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Regards,Sadik Merchant*
>>> *Mobile : +91-8087299269 <%2B91-8087299269>*
>>>
>>>
>>
>>
>> --
>>
>> *Regards,Sadik Merchant*
>> *Mobile : +91-8087299269 <%2B91-8087299269>*
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>> http://p.sf.net/sfu/ExoPlatform
>> _______________________________________________
>> Watin-development mailing list
>> Wat...@li...
>> https://lists.sourceforge.net/lists/listinfo/watin-development
>>
>>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Watin-development mailing list
> Wat...@li...
> https://lists.sourceforge.net/lists/listinfo/watin-development
>
>
--
*Regards,Sadik Merchant*
*Mobile : +91-8087299269*
|
|
From: Daaron D. <da...@gm...> - 2014-04-23 18:20:36
|
Your code isn't as important as the javascript on the target page. You need
to intercept the item blocking. For instance, you can intercept an alert
with something like:
RunScript("window.alert(){}");
You can use the same thing on window.open or whatever might be blocking.
On Wed, Apr 23, 2014 at 7:54 AM, Sadiq Merchant <sad...@gm...>wrote:
> it is very helpful if you provide some demo code.
>
>
> On 23 April 2014 18:23, Sadiq Merchant <sad...@gm...> wrote:
>
>> Thanks for your reply.
>>
>> Please find attached file of Browser Handler code.
>>
>> I ll explain you the flow of project.
>>
>> 1. we are automatically login using provided login details.
>>
>> 2. check for credit.click type of website.
>>
>> 3. after getting many website link click on by one on that link and earn
>> credit.
>>
>> 4. the problem we are facing is after earning the credit the used link
>> should be automatically closed and delete and click on another website link.
>>
>> 5. but when closing some websites it gives us popup and because of that
>> popup our application got crashed.
>>
>> 6. so we need to prevent or handle this popup automatically. so our
>> application does not crashed.
>>
>> Please provide us the solution for the same.
>>
>> Thank you.
>>
>>
>>
>> On 23 April 2014 17:48, Daaron Dwyer <da...@gm...> wrote:
>>
>>> The simplest way is to override the javascript, setting the event to do
>>> nothing. If you can post a code sample, I can be more specific.
>>> On Apr 23, 2014 2:15 AM, "Sadiq Merchant" <sad...@gm...> wrote:
>>>
>>>> Hi,
>>>>
>>>> We are developing one application using watin,The problem we are facing
>>>> is we are not able to handle popup which is closing on browser,So please
>>>> provide us the solution for the handling popup automatically so we can
>>>> overcome the issue.
>>>>
>>>> Thank you
>>>>
>>>> --
>>>>
>>>> *Regards,Sadik Merchant*
>>>> *Mobile : +91-8087299269 <%2B91-8087299269>*
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Watin-development mailing list
>>>> Wat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/watin-development
>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Watin-development mailing list
>>> Wat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/watin-development
>>>
>>>
>>
>>
>> --
>>
>> *Regards,Sadik Merchant*
>> *Mobile : +91-8087299269 <%2B91-8087299269>*
>>
>>
>
>
> --
>
> *Regards,Sadik Merchant*
> *Mobile : +91-8087299269 <%2B91-8087299269>*
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Watin-development mailing list
> Wat...@li...
> https://lists.sourceforge.net/lists/listinfo/watin-development
>
>
|
|
From: Sadiq M. <sad...@gm...> - 2014-04-23 12:54:20
|
it is very helpful if you provide some demo code. On 23 April 2014 18:23, Sadiq Merchant <sad...@gm...> wrote: > Thanks for your reply. > > Please find attached file of Browser Handler code. > > I ll explain you the flow of project. > > 1. we are automatically login using provided login details. > > 2. check for credit.click type of website. > > 3. after getting many website link click on by one on that link and earn > credit. > > 4. the problem we are facing is after earning the credit the used link > should be automatically closed and delete and click on another website link. > > 5. but when closing some websites it gives us popup and because of that > popup our application got crashed. > > 6. so we need to prevent or handle this popup automatically. so our > application does not crashed. > > Please provide us the solution for the same. > > Thank you. > > > > On 23 April 2014 17:48, Daaron Dwyer <da...@gm...> wrote: > >> The simplest way is to override the javascript, setting the event to do >> nothing. If you can post a code sample, I can be more specific. >> On Apr 23, 2014 2:15 AM, "Sadiq Merchant" <sad...@gm...> wrote: >> >>> Hi, >>> >>> We are developing one application using watin,The problem we are facing >>> is we are not able to handle popup which is closing on browser,So please >>> provide us the solution for the handling popup automatically so we can >>> overcome the issue. >>> >>> Thank you >>> >>> -- >>> >>> *Regards,Sadik Merchant* >>> *Mobile : +91-8087299269 <%2B91-8087299269>* >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Start Your Social Network Today - Download eXo Platform >>> Build your Enterprise Intranet with eXo Platform Software >>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >>> Get Started Now And Turn Your Intranet Into A Collaboration Platform >>> http://p.sf.net/sfu/ExoPlatform >>> _______________________________________________ >>> Watin-development mailing list >>> Wat...@li... >>> https://lists.sourceforge.net/lists/listinfo/watin-development >>> >>> >> >> ------------------------------------------------------------------------------ >> Start Your Social Network Today - Download eXo Platform >> Build your Enterprise Intranet with eXo Platform Software >> Java Based Open Source Intranet - Social, Extensible, Cloud Ready >> Get Started Now And Turn Your Intranet Into A Collaboration Platform >> http://p.sf.net/sfu/ExoPlatform >> _______________________________________________ >> Watin-development mailing list >> Wat...@li... >> https://lists.sourceforge.net/lists/listinfo/watin-development >> >> > > > -- > > *Regards,Sadik Merchant* > *Mobile : +91-8087299269* > > -- *Regards,Sadik Merchant* *Mobile : +91-8087299269* |
|
From: Sadiq M. <sad...@gm...> - 2014-04-23 12:53:49
|
using System; using System.Collections.Generic; using System.Text; using WatiN.Core; using System.Drawing; using System.Windows.Forms; using mshtml; using System.Runtime.InteropServices; using System.IO; using WatiN.Core.DialogHandlers; namespace Traffic_Juicer { class BrowserHandler { private static System.Windows.Forms.WebBrowser webBrowser; private static System.Windows.Forms.WebBrowser webBrowser2; private static System.Windows.Forms.WebBrowser webBrowser3; private static System.Windows.Forms.WebBrowser webBrowser4; public static IE GetNewBrowser() { IE browser = null; try { webBrowser = TrafficJuicer.webbie; webBrowser.Invoke(new MethodInvoker(delegate() { webBrowser.Navigate("https://mail.google.com/mail/ca/h"); //while (webBrowser.IsBusy) BotFunctions.Delay(1000); //while (webBrowser.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); WatiN.Core.Settings.AutoStartDialogWatcher = false; browser = null; browser = new IE(webBrowser.ActiveXInstance); browser.GoToNoWait("https://mail.google.com/mail/ca/h"); while (webBrowser.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); })); browser.WaitForComplete(600); BotFunctions.Delay(1000); } catch(Exception ex) { ErrorLog.CreateLog(ex.Message.ToString(), "GetNewBrowser"); //MessageBox.Show(ex.Message); } //Returns newly initialized browser. return browser; } public static IE GetOnlyBrowser() { IE browser = null; try { webBrowser2 = TrafficJuicer.webbie2; webBrowser2.Invoke(new MethodInvoker(delegate() { webBrowser2.Navigate("http://google.com"); //while (webBrowser2.IsBusy) BotFunctions.Delay(1000); //while (webBrowser2.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); WatiN.Core.Settings.AutoStartDialogWatcher = false; browser = null; browser = new IE(webBrowser2.ActiveXInstance); browser.GoToNoWait("https://www.google.com"); while (webBrowser2.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); })); browser.WaitForComplete(600); BotFunctions.Delay(1000); } catch (Exception ex) { ErrorLog.CreateLog(ex.Message.ToString(), "GetOnlyBrowser"); //MessageBox.Show(ex.Message); } // Returns newly initialized browser. return browser; } public static IE GetNewBrowser1() { IE browser = null; try { webBrowser3 = TrafficJuicer.webbie3; webBrowser3.Invoke(new MethodInvoker(delegate() { webBrowser3.Navigate("http://google.com"); //while (webBrowser3.IsBusy) BotFunctions.Delay(1000); //while (webBrowser3.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); WatiN.Core.Settings.AutoStartDialogWatcher = false; browser = null; browser = new IE(webBrowser3.ActiveXInstance); browser.GoToNoWait("https://mail.google.com/mail/ca/h"); while (webBrowser3.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); })); browser.WaitForComplete(600); BotFunctions.Delay(1000); } catch (Exception ex) { ErrorLog.CreateLog(ex.Message.ToString(), "GetNewBrowser1"); //MessageBox.Show(ex.Message); } //Returns newly initialized browser. return browser; } public static IE GetOnlyBrowser1() { IE browser = null; try { webBrowser4 = TrafficJuicer.webbie4; webBrowser4.Invoke(new MethodInvoker(delegate() { webBrowser4.Navigate("http://google.com"); //while (webBrowser4.IsBusy) BotFunctions.Delay(1000); //while (webBrowser4.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); //-------------------------------- WatiN.Core.Settings.AutoStartDialogWatcher = false; browser = null; browser = new IE(webBrowser4.ActiveXInstance); browser.GoToNoWait("https://www.google.com"); while (webBrowser4.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); })); browser.WaitForComplete(600); BotFunctions.Delay(1000); } catch (Exception ex) { ErrorLog.CreateLog(ex.Message.ToString(), "GetOnlyBrowser1"); //MessageBox.Show(ex.Message); } // Returns newly initialized browser. return browser; } public static void KillBrowser(IE browser) { if (browser != null) { browser.Close(); } } [ComImport, InterfaceType((short)1), Guid("3050F669-98B5-11CF-BB82-00AA00BDCE0B")] private interface IHTMLElementRenderFixed { void DrawToDC(IntPtr hdc); void SetDocumentPrinter(string bstrPrinterName, IntPtr hdc); } public static bool PrivateBrowser(string link, string newPath, int OriginalNumber) { bool read = false; try { webBrowser3 = TrafficJuicer.webbie3; webBrowser3.Invoke(new MethodInvoker(delegate() { webBrowser3.Navigate(link); while (webBrowser3.ReadyState != WebBrowserReadyState.Complete) Application.DoEvents(); //Bitmap bmp = new Bitmap (50,50); //webBrowser3.DrawToBitmap(bmp, new Rectangle(new Point(),webBrowser3.Size)); HtmlElement e = webBrowser3.Document.GetElementsByTagName("img")[0]; IHTMLImgElement img = (IHTMLImgElement)e.DomElement; IHTMLElementRenderFixed render = (IHTMLElementRenderFixed)img; Bitmap bmp = new Bitmap(img.width, img.height); Graphics g = Graphics.FromImage(bmp); IntPtr hdc = g.GetHdc(); render.DrawToDC(hdc); g.ReleaseHdc(hdc); string filename = newPath + "\\" + Guid.NewGuid().ToString() + ".bmp"; bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Bmp); string strText = ""; string FileLocation = AppDomain.CurrentDomain.BaseDirectory + "tessdata\\"; double txtConfidance; string blackpath = ChangeBackColor.GetImageBlack(filename); Bitmap image1 = new Bitmap(blackpath); using (tessnet2.Tesseract ocr = new tessnet2.Tesseract()) { ocr.SetVariable("tessedit_char_whitelist", "0123456789"); // If digit only ocr.Init(FileLocation, "eng", true); // To use correct tessdata List<tessnet2.Word> result = ocr.DoOCR(image1, System.Drawing.Rectangle.Empty); image1.Dispose(); foreach (tessnet2.Word word in result) { txtConfidance = word.Confidence; strText += word.Text.Trim(); } } if (OriginalNumber == Convert.ToInt32(strText)) { read = true; } if (File.Exists(filename)) { File.Delete(filename); } if (File.Exists(blackpath)) { File.Delete(blackpath); } })); BotFunctions.Delay(1000); } catch (Exception ex) { ErrorLog.CreateLog(ex.Message.ToString(), "PrivateBrowser"); //MessageBox.Show(ex.Message); } //Returns newly initialized browser. return read; } } } |
|
From: Daaron D. <da...@gm...> - 2014-04-23 12:18:14
|
The simplest way is to override the javascript, setting the event to do nothing. If you can post a code sample, I can be more specific. On Apr 23, 2014 2:15 AM, "Sadiq Merchant" <sad...@gm...> wrote: > Hi, > > We are developing one application using watin,The problem we are facing is > we are not able to handle popup which is closing on browser,So please > provide us the solution for the handling popup automatically so we can > overcome the issue. > > Thank you > > -- > > *Regards,Sadik Merchant* > *Mobile : +91-8087299269 <%2B91-8087299269>* > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Watin-development mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-development > > |
|
From: Sadiq M. <sad...@gm...> - 2014-04-23 07:13:22
|
Hi, We are developing one application using watin,The problem we are facing is we are not able to handle popup which is closing on browser,So please provide us the solution for the handling popup automatically so we can overcome the issue. Thank you -- *Regards,Sadik Merchant* *Mobile : +91-8087299269* |
|
From: Aurelian M. <aur...@ya...> - 2013-01-04 10:35:48
|
Hi Jeroen, that sounds good, I was going to submit patch ..., this will be faster..... Best, aurelian ________________________________ From: Jeroen van Menen <jv...@gm...> To: Aurelian Maga <aur...@ya...>; "wat...@li..." <wat...@li...> Cc: "wat...@li..." <wat...@li...> Sent: Wednesday, January 2, 2013 2:06 PM Subject: Re: [Watin-development] web driver development Hi Aurelian, Would you like to have commit rights on Sourceforge so that others can benefit from your work and maybe even offer help? Regards, Jeroen Verstuurd vanaf mijn iPhone Op 19 dec. 2012 om 07:14 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: Hello, > > >I've started working on WebDriver integration picking up from Jeroen work. So far I have update the code to the latest web driver version 2.28 > > >Thank you, >aurelian ------------------------------------------------------------------------------ >LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >Remotely access PCs and mobile devices and provide instant support >Improve your efficiency, and focus on delivering more value-add services >Discover what IT Professionals Know. Rescue delivers >http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ >Watin-development mailing list >Wat...@li... >https://lists.sourceforge.net/lists/listinfo/watin-development > |
|
From: Aurelian M. <aur...@ya...> - 2012-12-19 06:15:06
|
Hello, I've started working on WebDriver integration picking up from Jeroen work. So far I have update the code to the latest web driver version 2.28 Thank you, aurelian |
|
From: marwa s. <mer...@ya...> - 2012-12-03 12:22:27
|
Dears,
I’m automating portal uses (java and Icefaces) my problem is when a click a link that opens popup page , it highlight the link and doesn’t open the pop-up ,I thought that the problem from the pop-up blocker and I turned it off and still not working and here is the Link html code :
<td class="iceDatTblCol1"><a class="iceCmdLnk linkValue" href="javascript:;" id="onlinePayment:panelTabSet1:0:quickPaymentTable:0:onlineBillInqiryLink101" onblur="setFocus('');" onclick="var form=formOf(this);form['onlinePayment:_idcl'].value='onlinePayment:panelTabSet1:0:quickPaymentTable:0:onlineBillInqiryLink101';form['billData'].value='null';return iceSubmitPartial(form,this,event);" onfocus="setFocus(this.id);"><img alt="" class="iceGphImg" height="32" id="onlinePayment:panelTabSet1:0:quickPaymentTable:0:_id212" src="../images/FormalFawryIcon/payButton_ltr.png" style="cursor:pointer ; border: none;" width="32" /></a></td></tr></tbody></table></td></tr></table>
And the popup html is :
<div id="onlinePayment:draggablePnlPop" class="icePnlPop icePnlPop" name="onlinePayment:draggablePnlPop" style="visibility: visible; position: absolute; top: 253px; left: 484px; z-index: 25002;">
I wrote this code to click on the link but it doesn’t work
browser.Link(Find.ById("onlinePayment:panelTabSet1:0:quickPaymentTable:0:onlineBillInqiryLink101")).Click();
I’d be grateful if anyone have an answer for this problem
Best Regards
Marwa Ahmed
Senior Software Quality Engineer |
|
From: Jeroen v. M. <je...@va...> - 2012-09-27 09:33:28
|
Hi all, Recently the project site and code repository has been upgraded to the new SourceForge platform. This has effect on the url of the repository (if you want to get the latest changes). see message below for more info. Regards, Jeroen ---------- Forwarded message ---------- From: SourceForge.net <nor...@in...> Date: Sun, Sep 16, 2012 at 9:06 AM Subject: SourceForge Repo Clone Complete To: no...@in... Your cloned repository code in project watin is now ready for use. Old repository url: file:///nfs/classic/sf-svn/w/wa/watin New repository checkout command: svn checkout --username=....... svn+ssh://jvmenen@svn.code.sf.net/p/watin/code/trunk watin-code You and any other developers should do a fresh checkout using the new repository location. |
|
From: Fabián B. <fab...@gm...> - 2012-05-24 12:36:26
|
Hi all, we were waiting for developers discussion of our solution. If anyone is interested in MozReplJSSH aproach, write us / me at fabian.baptista at abstracta . com . uy regards, On Tue, May 15, 2012 at 11:20 AM, Fabián Baptista <fab...@gm...>wrote: > Hi all, > we have recently implemented JSSH approach over MozRepl (Thank you very > much Michael Heerklotz) > So, we are currently running test over Firefox 4 - 12 using Watin 2.0 > > We have updated Watin version to 2.1, but we saw that JSSH support was > removed. Right? > Since Watin execute A LOT of JS commands over Firefox, and MozReplJSSH > version is more faster than MozRepl we think it would be great keep old > mechanism. > > It's basically faster because MozRepl runs JS calling this method: > loadSubscript(file, context) > It save each JS in a file, and Firefox needs to load it before running. > > Michael has found a way to implement context switching between sandboxes, > so now, we have a speedy version of JSSH reimplemented over MozRepl fully > functional, tested in all plattforms. > > We hear you, > regards, > Fabián Baptista > > -- > > |
|
From: Fabián B. <fab...@gm...> - 2012-05-15 14:21:10
|
Hi all,
we have recently implemented JSSH approach over MozRepl (Thank you very
much Michael Heerklotz)
So, we are currently running test over Firefox 4 - 12 using Watin 2.0
We have updated Watin version to 2.1, but we saw that JSSH support was
removed. Right?
Since Watin execute A LOT of JS commands over Firefox, and MozReplJSSH
version is more faster than MozRepl we think it would be great keep old
mechanism.
It's basically faster because MozRepl runs JS calling this method:
loadSubscript(file, context)
It save each JS in a file, and Firefox needs to load it before running.
Michael has found a way to implement context switching between sandboxes,
so now, we have a speedy version of JSSH reimplemented over MozRepl fully
functional, tested in all plattforms.
We hear you,
regards,
Fabián Baptista
--
|
|
From: Aurelian M. <aur...@ya...> - 2012-04-11 21:52:39
|
Hi Jeroen, That's good news! I've just run the FF unit test and they were passing. I'll look into them as well. Thank you, aurelian ________________________________ From: Jeroen van Menen <jv...@gm...> To: Aurelian Maga <aur...@ya...> Cc: "wat...@li..." <wat...@li...> Sent: Thursday, April 12, 2012 12:46 AM Subject: Re: [Watin-development] WatiN with MozRepl Hi Aurelian, Just to let you know: Your patch is up and running. Feeding it the whole set of WatiN regression tests exposed some issues but I have fixed most of them. Almost all is passing, most broken functionality currently is the AttachTo functionality and a handfull of other smaller issues. Awesome work! Very pleased we can offer testing of FireFox latests with WatiN soon :-) Regards, Jeroen On Mon, Apr 9, 2012 at 8:05 AM, Jeroen van Menen <jv...@gm...> wrote: > AWESOME! I'll probably have time tonight to give the patch a try. Wondering > if support for JSSH is still needed after this. Thoughts any one? > > Thanx again! > Jeroen > > Op 7 apr. 2012 om 14:11 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Hi, > > here is the patch for WatiN to work with MozRepl. Most of the changes are > related to FirefoxClientPort and needed to drive FF through MozRepl. I > haven't thought how can we keep both jssh and mozrepl. > > To have it working: > > 1. apply patch > > 2. install mozrepl https://addons.mozilla.org/en-US/firefox/addon/mozrepl/ > > 3. add getWindows from mozrepl.js to mozrepl > (https://github.com/bard/mozrepl/wiki/Custom-commands) > > Any suggestions/remarks are welcome. > > Regards, > relu > > ________________________________ > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; > wat...@li... > Sent: Wednesday, April 4, 2012 6:14 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Hi, > > This morning I did commit my latest changes, containing some breaking > changes regarding the INative.... Interfaces. These are made to abstract > some behavior so browser implementations can create their own, like > TypeTextAction and SelectAction. Might be that for the mozrepl > implementation you can just use the Firefox implementation for these > actions. > > Regards, > Jeroen > > Op 31 mrt. 2012 om 15:08 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Great, I'll look forward to it as I was planning to replace existing firefox > client port. > > relu > > ________________________________ > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; > "wat...@li..." > <wat...@li...> > Cc: "wat...@li..." > <wat...@li...> > Sent: Saturday, March 31, 2012 12:36 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Awesome! I hope the current native firefox classes give you a nice starting > point. I have injecting different browser implementations pluggable (used in > the watinbasewithbrowser class). I'll commit this soon so you can work on > your new implementation more easily. > > If you need any help, let me know, > Jeroen > > Verstuurd vanaf mijn iPad > > Op 30 mrt. 2012 om 20:33 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Hi, > > I've started working on integrating WatiN with MozRepl(jssh replacement) for > FireFox. Any suggestions/comments are appreciated. > > relu > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > _______________________________________________ > Watin-development mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-development > > > > > > <mozrepl.patch> > > <mozrepl.js> |
|
From: Jeroen v. M. <jv...@gm...> - 2012-04-11 21:46:47
|
Hi Aurelian, Just to let you know: Your patch is up and running. Feeding it the whole set of WatiN regression tests exposed some issues but I have fixed most of them. Almost all is passing, most broken functionality currently is the AttachTo functionality and a handfull of other smaller issues. Awesome work! Very pleased we can offer testing of FireFox latests with WatiN soon :-) Regards, Jeroen On Mon, Apr 9, 2012 at 8:05 AM, Jeroen van Menen <jv...@gm...> wrote: > AWESOME! I'll probably have time tonight to give the patch a try. Wondering > if support for JSSH is still needed after this. Thoughts any one? > > Thanx again! > Jeroen > > Op 7 apr. 2012 om 14:11 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Hi, > > here is the patch for WatiN to work with MozRepl. Most of the changes are > related to FirefoxClientPort and needed to drive FF through MozRepl. I > haven't thought how can we keep both jssh and mozrepl. > > To have it working: > > 1. apply patch > > 2. install mozrepl https://addons.mozilla.org/en-US/firefox/addon/mozrepl/ > > 3. add getWindows from mozrepl.js to mozrepl > (https://github.com/bard/mozrepl/wiki/Custom-commands) > > Any suggestions/remarks are welcome. > > Regards, > relu > > ________________________________ > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; > wat...@li... > Sent: Wednesday, April 4, 2012 6:14 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Hi, > > This morning I did commit my latest changes, containing some breaking > changes regarding the INative.... Interfaces. These are made to abstract > some behavior so browser implementations can create their own, like > TypeTextAction and SelectAction. Might be that for the mozrepl > implementation you can just use the Firefox implementation for these > actions. > > Regards, > Jeroen > > Op 31 mrt. 2012 om 15:08 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Great, I'll look forward to it as I was planning to replace existing firefox > client port. > > relu > > ________________________________ > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; > "wat...@li..." > <wat...@li...> > Cc: "wat...@li..." > <wat...@li...> > Sent: Saturday, March 31, 2012 12:36 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Awesome! I hope the current native firefox classes give you a nice starting > point. I have injecting different browser implementations pluggable (used in > the watinbasewithbrowser class). I'll commit this soon so you can work on > your new implementation more easily. > > If you need any help, let me know, > Jeroen > > Verstuurd vanaf mijn iPad > > Op 30 mrt. 2012 om 20:33 heeft Aurelian Maga <aur...@ya...> het > volgende geschreven: > > Hi, > > I've started working on integrating WatiN with MozRepl(jssh replacement) for > FireFox. Any suggestions/comments are appreciated. > > relu > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > _______________________________________________ > Watin-development mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-development > > > > > > <mozrepl.patch> > > <mozrepl.js> |
|
From: Jeroen v. M. <jv...@gm...> - 2012-04-09 06:06:06
|
AWESOME! I'll probably have time tonight to give the patch a try. Wondering if support for JSSH is still needed after this. Thoughts any one? Thanx again! Jeroen Op 7 apr. 2012 om 14:11 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: > Hi, > > here is the patch for WatiN to work with MozRepl. Most of the changes are related to FirefoxClientPort and needed to drive FF through MozRepl. I haven't thought how can we keep both jssh and mozrepl. > > To have it working: > > 1. apply patch > > 2. install mozrepl https://addons.mozilla.org/en-US/firefox/addon/mozrepl/ > > 3. add getWindows from mozrepl.js to mozrepl (https://github.com/bard/mozrepl/wiki/Custom-commands) > > Any suggestions/remarks are welcome. > > Regards, > relu > > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; wat...@li... > Sent: Wednesday, April 4, 2012 6:14 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Hi, > > This morning I did commit my latest changes, containing some breaking changes regarding the INative.... Interfaces. These are made to abstract some behavior so browser implementations can create their own, like TypeTextAction and SelectAction. Might be that for the mozrepl implementation you can just use the Firefox implementation for these actions. > > Regards, > Jeroen > > Op 31 mrt. 2012 om 15:08 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: > >> Great, I'll look forward to it as I was planning to replace existing firefox client port. >> >> relu >> >> From: Jeroen van Menen <jv...@gm...> >> To: Aurelian Maga <aur...@ya...>; "wat...@li..." <wat...@li...> >> Cc: "wat...@li..." <wat...@li...> >> Sent: Saturday, March 31, 2012 12:36 PM >> Subject: Re: [Watin-development] WatiN with MozRepl >> >> Awesome! I hope the current native firefox classes give you a nice starting point. I have injecting different browser implementations pluggable (used in the watinbasewithbrowser class). I'll commit this soon so you can work on your new implementation more easily. >> >> If you need any help, let me know, >> Jeroen >> >> Verstuurd vanaf mijn iPad >> >> Op 30 mrt. 2012 om 20:33 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: >> >>> Hi, >>> >>> I've started working on integrating WatiN with MozRepl(jssh replacement) for FireFox. Any suggestions/comments are appreciated. >>> >>> relu >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> Watin-development mailing list >>> Wat...@li... >>> https://lists.sourceforge.net/lists/listinfo/watin-development >> >> > > > <mozrepl.patch> > <mozrepl.js> |
|
From: Jeroen v. M. <jv...@gm...> - 2012-04-04 15:15:07
|
Hi, This morning I did commit my latest changes, containing some breaking changes regarding the INative.... Interfaces. These are made to abstract some behavior so browser implementations can create their own, like TypeTextAction and SelectAction. Might be that for the mozrepl implementation you can just use the Firefox implementation for these actions. Regards, Jeroen Op 31 mrt. 2012 om 15:08 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: > Great, I'll look forward to it as I was planning to replace existing firefox client port. > > relu > > From: Jeroen van Menen <jv...@gm...> > To: Aurelian Maga <aur...@ya...>; "wat...@li..." <wat...@li...> > Cc: "wat...@li..." <wat...@li...> > Sent: Saturday, March 31, 2012 12:36 PM > Subject: Re: [Watin-development] WatiN with MozRepl > > Awesome! I hope the current native firefox classes give you a nice starting point. I have injecting different browser implementations pluggable (used in the watinbasewithbrowser class). I'll commit this soon so you can work on your new implementation more easily. > > If you need any help, let me know, > Jeroen > > Verstuurd vanaf mijn iPad > > Op 30 mrt. 2012 om 20:33 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: > >> Hi, >> >> I've started working on integrating WatiN with MozRepl(jssh replacement) for FireFox. Any suggestions/comments are appreciated. >> >> relu >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Watin-development mailing list >> Wat...@li... >> https://lists.sourceforge.net/lists/listinfo/watin-development > > |
|
From: Jeroen v. M. <jv...@gm...> - 2012-03-31 09:36:16
|
Awesome! I hope the current native firefox classes give you a nice starting point. I have injecting different browser implementations pluggable (used in the watinbasewithbrowser class). I'll commit this soon so you can work on your new implementation more easily. If you need any help, let me know, Jeroen Verstuurd vanaf mijn iPad Op 30 mrt. 2012 om 20:33 heeft Aurelian Maga <aur...@ya...> het volgende geschreven: > Hi, > > I've started working on integrating WatiN with MozRepl(jssh replacement) for FireFox. Any suggestions/comments are appreciated. > > relu > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Watin-development mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-development |
|
From: Aurelian M. <aur...@ya...> - 2012-03-30 18:33:18
|
Hi, I've started working on integrating WatiN with MozRepl(jssh replacement) for FireFox. Any suggestions/comments are appreciated. relu |
|
From: Gururaj K. <gur...@gm...> - 2011-11-04 17:29:21
|
Hi Does anyone know if there is any plan to support latter versions of firefox (> 3.6) by WatiN? As currently i feel it only supports all version of IE. It only supports Firefox 2.x - 3.6 ( http://watin.org/documentation/setting-up-firefox/) Thanks Guru (Gururaj Kulkarni) |