Contenidos
Automatización de tareas: leer un fichero XML y procesarlo
- https://www.jesusninoc.com/02/20/leer-contenido-xml/
- https://www.jesusninoc.com/02/10/importar-un-contenido-xml-en-powershell/
- https://www.jesusninoc.com/07/10/html-parsing-get-information-from-a-website-bbc-news-2017/
Automatizar la creación de usuarios
- https://www.jesusninoc.com/02/04/utilizar-json-con-nombres-y-apellidos-aleatorios/
- https://github.com/jesusninoc/ClasesIAW/blob/master/2021-01-18.md#ver-informaci%C3%B3n-sobre-usuarios-random-con-powershell
Crear código para someterlo a pruebas automáticas
Ayuda
Códigos en PowerShell para automatizar
Hacer click izquierdo constantemente
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$MouseEventSig=@’ [DllImport("user32.dll",CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)] public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo); ‘@ $MouseEvent = Add-Type -memberDefinition $MouseEventSig -name 'MouseEventWinApi' -passThru for($true) { [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(61,45) $MouseEvent::mouse_event(0x00000002, 0, 0, 0, 0) $MouseEvent::mouse_event(0x00000004, 0, 0, 0, 0) Start-Sleep -Seconds 1 } |
Escribir en pantalla
1 2 3 |
Start-Sleep -Seconds 5 [System.Windows.Forms.SendKeys]::SendWait("hla") [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") |
Escribir un número aleatorio cada 5 segundos de forma continuada
1 2 3 4 5 6 7 |
for(1) { $aleatorio = Get-Random (1..100000) Start-Sleep -Seconds 5 [System.Windows.Forms.SendKeys]::SendWait($aleatorio) [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") } |
Automatización 2
- https://www.jesusninoc.com/02/03/crear-formulario-dentro-de-otro-formulario-mediante-una-funcion-con-powershell/
- https://www.jesusninoc.com/02/03/crear-una-aplicacion-grafica-en-powershell-que-represente-un-piano-con-las-notas-del-do-a-si-y-que-suene-cada-nota/
- https://www.jesusninoc.com/01/04/curso-de-formularios-con-powershell/#Aplicaciones_WPF_Windows_Presentation_Foundation
- https://www.jesusninoc.com/01/30/crear-un-formulario-en-powershell/
- https://www.jesusninoc.com/01/30/buscar-el-nombre-de-una-clase-de-un-formulario-en-powershell-con-microsoft-spy/
- https://www.jesusninoc.com/01/30/buscar-el-nombre-de-una-clase-de-un-formulario-en-powershell-con-microsoft-spy-y-escribir-un-mensaje-en-una-caja-de-texto-desde-powershell/
- https://www.jesusninoc.com/01/30/activar-el-boton-de-start-de-apache-en-xampp-control-panel-automaticamente-desde-powershell-utilizando-sendmessage-y-findwindowex-de-user32-dll/
- https://www.jesusninoc.com/01/30/escribir-y-un-mensaje-en-una-caja-de-texto-y-hacer-click-en-un-boton-de-un-formulario-de-powershell-de-forma-automatica-utilizando-sendmessage-y-findwindowex-de-user32-dll/