User Tools

Site Tools


es:objects_identification

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

es:objects_identification [2018/01/16 15:45]
tast created
es:objects_identification [2019/09/10 06:55] (current)
tast [Encontrar selectores:]
Line 1: Line 1:
-====== ​Objects Identification ​======+====== ​Identificación de Objetos ​======
  
-{{:​TAST-icon.png?​nolink&​70|}} When working with an automation toolit is very important to be able to identify objects and work with themOtherwisethe automation tool will not know where to click or type.+Cuando se trabaja con una herramienta de automatizaciónes muy importante poder identificar objetos y trabajar con ellosDe lo contrariola herramienta de automatización no sabrá dónde hacer click o escribir.
  
-For solving this issuenormallythe object properties are usedThose are some of the attributesidentificationsnames, etc... ​that every object uses for being recognized and modified.+Para resolver este problemanormalmentese utilizan las propiedades del objetoEsos son algunos de los atributosidentificacionesnombres, etc... ​que cada objeto utiliza para ser reconocido y modificado.
  
-As TAST userit is possible to work with themAfter creating the messages ​(let us use the CLICK message as an example), and the parameters needed for it (for instanceclicking on the LOGIN button), we can select how to identify the button+Como usuario de TAST, es posible trabajar con ellosDespués de crear los mensajes ​(usemos el mensaje ​CLICK como ejemploy los parámetros necesarios para ello (por ejemplohaciendo click en el botón ​LOGIN), ​podemos seleccionar cómo identificar el botón
  
-As it is shown in the image besidethe dropdown ​"Search by" ​gives us the option of choosing between:+Como se muestra en la imagen de al ladoel menú desplegable ​"Buscar por" ​nos da la opción de elegir entre:
  
   * Class Name   * Class Name
Line 20: Line 20:
 {{:​Search_by_eng.png?​nolink&​2500|}} {{:​Search_by_eng.png?​nolink&​2500|}}
  
-With every one of them, TAST user will have to fill out the field "Element" ​at the right sidethat will contain the value of the option selected in "Search by"​. ​For exampleif we want to use the attribute ​"​Id" ​for the Login buttonwe will have to write in the element fieldthe ID of the button itself.+Con cada uno de ellosel usuario de TAST deberá completar el campo "Elemento" ​a la derechaque contendrá el valor de la opción seleccionada en "Buscar por"​. ​Por ejemplosi queremos utiliar el atributo ​"​Id" ​para el botón de Inicio de sesióntendremos que escribir en el campo elementola ID del propio botón.
    
-Neverthelessfor avoid complications and problems while running the testwe have to make sure that the attribute we choose defines UNIQUELY the button ​(or other elementwe want to work withFor instanceif the webpage has two different buttons with the same Tag Namethe user needs to avoid the usage of Tag Name property for its definition ​(otherwisethe automatic test will not know which one of them is the correct one andsoit will fail). Since these parameters are needed to be __unique__there are two options in TAST to help us to make it happen ​([[XPath]] ​and [[CSS Selector]]).+Sin embargopara evitar complicaciones y problemas al ejecutar la pruebadebemos asegurarnos de que el atributo que elijamos define UNIcamente el botón ​(u otro elementocon el que queremos trabajarPor ejemplosi la página web tiene dos botones diferentes con el mismo nombre de etiquetael usuario debe evitar el uso de la propiedad Nombre de etiqueta para su definición ​(de lo contrariola prueba automática no sabrá cuál de ellos es la correcta ypor lo tantofallará). Dado que se necesitan estos parámetros para que sean  __únicos__hay dos opciones en TAST para ayudarnos a que esto suceda ​([[XPath]] ​[[CSS Selector]]).
  
-===== Tools for finding selectors: =====+===== Herramientas para encontrar selectores: =====
  
-==== Checking Selectors: ====+==== Comprobando Selectores: ====
  
-Google Chrome ​explorer gives us the chance to check if a CSS Selector ​or a Xpath is uniquely definedFor doing thisthe procedure is as follows:+El explorador de Google Chrome ​nos da la oportunidad de verificar si un Selector ​CSS o un Xpath está definido de manera únicaPara hacer estoel procedimiento es el siguiente:
  
-  * Open Google Chrome, and navigate to the webpage that will be tested +  * Abra Google Chrome ​y acceda a la página web que se va a probar. 
-  * Press F12, and after that press CTRL + F (Strg+F ​in German keyboards+  * Pulse F12, y después pulse CTRL + F (Strg+F ​en los teclados alemanes). 
-  * A search bar appears downwardsUse it to introduce the Xpath or CSS selectorand at the right side will appear a number ​"​n/​n" ​if this number is 1/1, the element is defined uniquely. +  * Una barra de búsqueda aparece hacia abajoÚselo para introducir el selector ​Xpath CSS, y en el lado derecho aparecerá un número ​"​n/​n" ​si este número es 1/1, el elemento se define de forma única.
-  *  +
-==== Finding Selectors: ====+
  
-Also, for ease the way of work with this attributes, in case of need, user can download {{here }} an __excel sheet__ that helps to choose the proper identifier.+==== Encontrar selectores: ====
  
-The working of this tool is as follows:+Además, para facilitar la forma de trabajar con estos atributos, en caso de necesidad, el usuario puede descargar aquí {{Fire-IEBrowser1.4.xls}} un __excel sheet__ que le ayudará a elegir el identificador adecuado.
  
-  ​first of allthe excel book needs some permissions ​(for granting them, click on "​Enable Content", ​+El funcionamiento de esta herramienta es el siguiente:​ 
 + 
 +  ​En primer lugarel libro de Excel necesita algunos permisos ​(para concederloshaga click en "​Enable Content", ​
  
 {{:excel permissions_eng.png?​nolink&​400|}} {{:excel permissions_eng.png?​nolink&​400|}}
  
-  * Thena popup comes out saying ​"FIRE - IE BROWSER - WEB ELEMENT DETAILS"​. ​Click on "Proceed.."+  * Entoncesaparece una ventana emergente que dice "FIRE - IE BROWSER - WEB ELEMENT DETAILS"​. ​Haga click en "Continuar..."
  
-  * After thatan explorer opens uponly by introducing the URL and clicking in Loadthe user can be able to click (with the right mouse buttonin the desired elementA pop up asks for a name to classify the element ​(the user can choose the one easier to remind).+  * Después de esose abre un exploradorsolo introduciendo la URL y haciendo click en Cargarel usuario puede hacer click (con el botón derecho del ratónen el elemento deseadoUna ventana emergente solicita un nombre para clasificar el elemento ​(el usuario puede elegir el más fácil de recordar).
  
-  * When all the elements needed are clicked and namedafter closing the explorerthe user can see a complete list with all the elements chosen beforeand the main used attributes and identifiers ​(XPath, CSS, ID and name), and the type of element.+  * Cuando todos los elementos necesarios son pulsados y nombradosdespués de cerrar el exploradorel usuario puede ver una lista completa con todos los elementos elegidos anteriormentey los principales atributos e identificadores utilizados ​(XPath, CSS, ID y nombre), y el tipo de elemento.
  
-**Please take care to ensure that the CSS or the Name are Unique before using themto avoid errors in the test launch.**+**Por favor asegúrese que el CSS o el Nombre sean únicos antes de usarlospara evitar errores en el lanzamiento de la prueba.**\\ 
  
 {{:​google_eng.png?​nolink&​1500|}} {{:​google_eng.png?​nolink&​1500|}}
  
es/objects_identification.1516117522.txt.gz · Last modified: 2018/01/16 15:45 by tast