[Owasp-o2-platform] WatiN script as a stand alone tool and couple blog posts that explain how it was created and how to use it

Dinis Cruz dinis.cruz at owasp.org
Fri Mar 15 14:38:14 UTC 2013


Arnaud,

I just packaged the WatiN script as a stand-alone executable which you can
download from here: IE Automation (Simple mode)
v1.0.exe<https://code.google.com/p/o2platform/downloads/detail?name=IE%20Automation%20%28Simple%20mode%29%20v1.0.exe&can=2&q=>

I just wrote a blog post on how I created that stand-alone tool which you
might find interesting:

Packaging an O2 Platform Script as a stand alone tool (in this case the
WatiN based ‘IE Script’
tool)<http://blog.diniscruz.com/2013/03/packaging-o2-platform-script-as-stand.html>

(this also applies to other O2 scripts, so if you want to package one of
your scripts as an exe, take a look and let me know what you think of it)

Also, to help you get your head around the APIs I wrote this blog post that
shows the IE/WatiN automation in action, and how I tend to use it:

Writing an IE Automation script to login into UK’s Wifi (using O2
Platform’s WatiN
ExtensionMethods)<http://blog.diniscruz.com/2013/03/writing-ie-automation-script-to-login.html>

(at the end of that post there are a number of script samples that should
help you)

Dinis Cruz

On 15 March 2013 12:24, Arnaud SOULLIÉ <soullie.arnaud at gmail.com> wrote:

> That is really kind, thanks.
>
> The browser REPL script works, and allows me to control IE without errors.
>
> Thank you again,
>
> Arnaud
>
>
> On Fri, Mar 15, 2013 at 11:55 AM, Dinis Cruz <dinis.cruz at owasp.org> wrote:
>
>> The prob is that it looks like you are offline and some of the
>> dependencies failed to download
>>
>> Can you try the 'Browser REPL' script?
>>
>> That one just uses the vanilla .Net WevBrowser control
>>
>> Meanwhile, let me create a offline package for you
>>
>> Dinis Cruz
>>
>> On 15 Mar 2013, at 10:41, Arnaud SOULLIÉ <soullie.arnaud at gmail.com>
>> wrote:
>>
>>
>> On Thu, Mar 14, 2013 at 11:51 PM, Ian Spiro <ianspiro at us.ibm.com> wrote:
>>
>>> way to get a full installation of the current bits is to obtain (zip,
>>> ssh, git) a copy from the O2_Install repository on GitHub:
>>>
>>
>>
>> Hi,
>>
>> Thanks for your reply. However, that didn't solve the problem. The Github
>> "O2_Install repository" repository, as well as the link on the OWASP
>> page, does not include all the necessary libraries (apparently, but
>> maybe I'm getting something wrong).
>>
>> Following is the output of the console when I launch o2 from my VM (and
>> by o2 I mean this .exe :
>> https://o2platform.googlecode.com/files/O2%20Platform%20-%20Main%20O2%20Gui%20v5.1.1.exe
>> ) and I try "IE Google" script :
>>
>> [11:32:44] ERROR: CompilationErrors:
>>
>> 26::13::CS1061::'System.Windows.Forms.Panel' ne contient pas une
>> définition pour 'add_IE_ExecutionGui' et aucune méthode d'extension
>> 'add_IE_ExecutionGui' acceptant un premier argument de type
>> 'System.Windows.Forms.Panel' n'a été trouvée (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Local Settings\Temp\3dre5tsu.0.cs
>> [11:32:44] ERROR: Compilation failed
>> [11:32:44] ERROR: [CSharp_FastCompiler] Compilation Error:
>> 26::13::CS1061::'System.Windows.Forms.Panel' ne contient pas une définition
>> pour 'add_IE_ExecutionGui' et aucune méthode d'extension
>> 'add_IE_ExecutionGui' acceptant un premier argument de type
>> 'System.Windows.Forms.Panel' n'a été trouvée (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Local Settings\Temp\3dre5tsu.0.cs
>> [11:32:43] INFO: Compiling Source Code (Size: 876)
>> [11:32:43] ERROR: Compilation failed: 29::7::CS0246::Le type ou le nom
>> d'espace de noms 'SHDocVw' est introuvable (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 30::7::CS0246::Le type ou le nom d'espace de noms 'mshtml' est
>> introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 24::7::CS0246::Le type ou le nom d'espace de noms 'SHDocVw' est
>> introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 198::37::CS0246::Le type ou le nom d'espace de noms
>> 'HTMLHtmlElementClass' est introuvable (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 205::18::CS0246::Le type ou le nom d'espace de noms
>> 'HTMLHtmlElementClass' est introuvable (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 345::20::CS0246::Le type ou le nom d'espace de noms
>> 'InternetExplorerClass' est introuvable (une directive using ou une
>> référence d'assembly est-elle manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 1403::20::CS0246::Le type ou le nom d'espace de noms 'IHTMLElement' est
>> introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 1584::23::CS0246::Le type ou le nom d'espace de noms 'IHTMLDOMAttribute'
>> est introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 1927::65::CS0246::Le type ou le nom d'espace de noms 'IWebBrowser2' est
>> introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> 38::10::CS0246::Le type ou le nom d'espace de noms 'SHDocVw' est
>> introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 61::19::CS0118::'O2.XRules.Database.APIs.WatiN_IE.InternetExplorer' est
>> un 'propriété' mais est utilisé comme un 'type'::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 88::28::CS0118::'O2.XRules.Database.APIs.WatiN_IE.InternetExplorer' est
>> un 'propriété' mais est utilisé comme un 'type'::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 229::22::CS0118::'O2.XRules.Database.APIs.WatiN_IE.InternetExplorer' est
>> un 'propriété' mais est utilisé comme un 'type'::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 368::60::CS0246::Le type ou le nom d'espace de noms 'InternetExplorer'
>> est introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 368::20::CS0246::Le type ou le nom d'espace de noms 'InternetExplorer'
>> est introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 379::57::CS0246::Le type ou le nom d'espace de noms 'InternetExplorer'
>> est introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> 385::56::CS0246::Le type ou le nom d'espace de noms 'InternetExplorer'
>> est introuvable (une directive using ou une référence d'assembly est-elle
>> manquante ?)::c:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>>
>> [11:32:43] ERROR: [tryToResolveReferencesForCompilation] failed to
>> resolve or load assembly reference: O2_Misc_Microsoft_MPL_Libs.dll
>> [11:32:43] INFO: could not load/find assembly
>> ('O2_Misc_Microsoft_MPL_Libs.dll')
>> [11:32:43] DEBUG: We are currently offline, skipping the check
>> [11:32:37] INFO: Trying to fetch assembly from O2's GitHub repository:
>> O2_Misc_Microsoft_MPL_Libs.dll
>> [11:32:37] INFO: could not load/find assembly
>> ('O2_Misc_Microsoft_MPL_Libs.dll')
>> [11:32:37] ERROR: [tryToResolveReferencesForCompilation] failed to
>> resolve or load assembly reference: Interop.SHDocVw.dll
>> [11:32:37] INFO: could not load/find assembly ('Interop.SHDocVw.dll')
>> [11:32:37] DEBUG: We are currently offline, skipping the check
>> [11:32:32] INFO: Trying to fetch assembly from O2's GitHub repository:
>> Interop.SHDocVw.dll
>> [11:32:32] INFO: could not load/find assembly ('Interop.SHDocVw.dll')
>> [11:32:32] ERROR: [tryToResolveReferencesForCompilation] failed to
>> resolve or load assembly reference: Microsoft.mshtml.dll
>> [11:32:32] INFO: could not load/find assembly ('Microsoft.mshtml.dll')
>> [11:32:32] DEBUG: We are currently offline, skipping the check
>> [11:32:24] INFO: Trying to fetch assembly from O2's GitHub repository:
>> Microsoft.mshtml.dll
>> [11:32:24] INFO: could not load/find assembly ('Microsoft.mshtml.dll')
>> [11:32:24] DEBUG: mapReferencesIncludedInSourceCode in 0s:30ms
>> [11:32:24] DEBUG: There are 17 referencedAssemblies used
>> [11:32:24] DEBUG:    C:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\Languages\DotNet\DotNet_ViewState.cs
>> [11:32:24] DEBUG:    C:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE.cs
>> [11:32:24] DEBUG:    C:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\WatiN\WatiN_IE_ExtensionMethods.cs
>> [11:32:24] DEBUG:    C:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\IE\IE_ExecutionGui\API_IE_ExecutionGUI.cs
>> [11:32:24] DEBUG: There are 4 files to compile
>> [11:32:24] INFO: There are 2 extra files to add to the list of source
>> code files to compile: 2
>> [11:32:24] DEBUG: Found reference 'DotNet_Viewstate.cs' in
>> 'WatiN_IE_ExtensionMethods.cs
>> [11:32:24] DEBUG: Found reference 'WatiN_IE.cs' in
>> 'WatiN_IE_ExtensionMethods.cs
>> [11:32:24] INFO: There are 1 extra files to add to the list of source
>> code files to compile: 1
>> [11:32:24] DEBUG: Found reference 'WatiN_IE_ExtensionMethods.cs' in
>> 'API_IE_ExecutionGUI.cs
>> [11:32:24] INFO: [CSharp Compiler] Compiling provided 1 external source
>> code references
>> [11:32:24] DEBUG: Ast parsing was OK
>> [11:32:24] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:24] INFO: Found resource for WeifenLuo.WinFormsUI.Docking at
>> WeifenLuo.WinFormsUI.Docking.dll.gz in Main O2 Gui
>> [11:32:24] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:23] INFO: Found resource for O2_Platform_External_SharpDevelop at
>> O2_Platform_External_SharpDevelop.dll.gz in Main O2 Gui
>> [11:32:23] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:23] INFO: Found resource for FluentSharp.REPL at
>> FluentSharp.REPL.exe.gz in Main O2 Gui
>> [11:32:23] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:23] INFO: Found resource for FluentSharp.BCL at
>> FluentSharp.BCL.dll.gz in Main O2 Gui
>> [11:32:22] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:22] INFO: Found resource for FluentSharp.CoreLib at
>> FluentSharp.CoreLib.dll.gz in Main O2 Gui
>> [11:32:21] DEBUG: in saveCachedCompiledAssembliesMappings
>> [11:32:21] INFO: Found resource for WatiN.Core.1x at WatiN.Core.1x.dll.gz
>> in Main O2 Gui
>> [11:32:20] INFO: Compiling Source Snippet (Size: 180)
>> [11:32:17] INFO: Setting CurrentScript to:: C:\Documents and
>> Settings\daffyduck\Bureau\O2.Platform.Scripts\APIs\IE\IE_ExecutionGui\IE_Google
>> - Execution.h2
>> [11:32:17] INFO: Setting CurrentScript to:: IE_Google - Execution.h2
>> [11:32:17] DEBUG: itemToExecute: IE_Google - Execution.h2
>> [11:32:17] INFO: executing script mapped to 'IE Google: IE_Google -
>> Execution.h2
>> [11:31:48] INFO: Testing logging: Info Message
>> [11:31:48] DEBUG: Testing logging: Debug Message
>>
>> Any ideas ?
>>
>> Thanks,
>>
>> Arnaud.
>>
>> _______________________________________________
>>
>> Owasp-o2-platform mailing list
>> Owasp-o2-platform at lists.owasp.org
>> https://lists.owasp.org/mailman/listinfo/owasp-o2-platform
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20130315/57c151c5/attachment-0001.html>


More information about the Owasp-o2-platform mailing list