Inspector
Inspector
Inspector will identify HTML elements, suggest, verify xpath, css selectors and where you can even test whether Selenium will interact with the object or not.
- Select browser type you want to work with and click on Open button.
- Navigate to needed URL.
- Click on the looking glass icon and click on element you want to inspect.
- Select “Click” operation from drop down next to “Validate” button.
- Click on the “Click” button to see if Selenium can click on the selected HTML element.
- Click on ‘XPath’ and select any other property you want to see for this object (eg: CSS Selector).
- Modify the text value (eg: XPath property value) to another one and click Validate to see if it works or not.
Code
This is where you can record or specify your own code and do a playback against any browser. Support any Java/Groovy code only.
- Click on Code tab.
- From menu select Browsers -> and select the type you want.
- Click on Record (red) button to begin recording and navigate to URL you will use.
- Do various clicking and typing actions you want and then click on Record (red) button again to stop.
- Click on Green arrow to playback recorded script.
- You can modify the code (ANY Java/Groovy code with asserts, loops, etc.) and do a playback against any browser as well.
- User can also copy/paste their own code in to Code section for quick validation/modification. Use ‘Driver variable name’ field to make sure it matches the one in your own code.
Post your comment on this topic.