<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Find elements in interface Selenium</title><link>https://community.appian.com/discussions/f/general/12758/find-elements-in-interface-selenium</link><description>Hi there! 
 
 I am trying to build my first automated test script using Java and Selenium and after logig within my Appian Site, I would like to fill a simple form but I don&amp;#39;t know how can I locate the different components (Textfield, Buttons, Dropdown</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Find elements in interface Selenium</title><link>https://community.appian.com/thread/57090?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 10:12:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:18c5002c-c81f-4c9b-ab6e-582c5dc1d7a8</guid><dc:creator>DaniHG</dc:creator><description>Hello Shiva and arikd398,&lt;br /&gt;
&lt;br /&gt;
Thank you so much for your answers! I have seen that I could find the component ID using &amp;quot;inspector&amp;quot; tool from my browser and, with that, I can find the web element and use it within the code.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find elements in interface Selenium</title><link>https://community.appian.com/thread/57088?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 09:59:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b037462-a9c3-47b9-9ed1-edb8cc665d5c</guid><dc:creator>arikd398</dc:creator><description>&lt;p&gt;Hi danielh855 ,&lt;/p&gt;
&lt;p&gt;We have implemented automated test script using java and selenium but apart from this two you will have to configure Cucumber framework aswell in order to inspect the elements and different components.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please find below the two links which i think might help you:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://toolsqa.com/selenium-cucumber-framework/selenium-end-to-end-automation-test/"&gt;http://toolsqa.com/selenium-cucumber-framework/selenium-end-to-end-automation-test/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.seleniumframework.com/cucumber-jvm-3/find-element-strategies/"&gt;http://www.seleniumframework.com/cucumber-jvm-3/find-element-strategies/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Every HTML element in Selenium Java is of type &amp;ldquo;WebElement&amp;rdquo;&lt;/p&gt;
&lt;p&gt;A WebElement can be compared to an in-memory (DOM) object representation of HTML tag&lt;/p&gt;
&lt;p&gt;If the reference of driver is of type &amp;ldquo;Webdriver&amp;rdquo;, then we use the second syntax style, otherwise the first style. Both the styles work fine.&lt;/p&gt;
&lt;p&gt;To identify a tag (aka. web element) we might need any(multiple) of the following&lt;/p&gt;
&lt;p&gt;By.id&lt;/p&gt;
&lt;p&gt;By.name&lt;/p&gt;
&lt;p&gt;By.linkText&lt;/p&gt;
&lt;p&gt;By.partialLinkText&lt;/p&gt;
&lt;p&gt;By.className&lt;/p&gt;
&lt;p&gt;By.CssSelector&lt;/p&gt;
&lt;p&gt;By.tagName&lt;/p&gt;
&lt;p&gt;By.xpath&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please find below some of the commands to identify the fields:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Retrieve HTML of WebElement&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To retrieve the HTML of WebElement we print the attribute &amp;ldquo;outerHTML&amp;rdquo; for the element.&lt;/p&gt;
&lt;p&gt;To retrieve attributes, we use the method &amp;ldquo;getAttribute&amp;rdquo; on the WebElement. We will discuss all the options in the training class, but for now, this should give you enough idea how to retrieve different values out of a HTML tag [aka. WebElement in Selenium language]&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s try to identify all elements on the above practiceselenium website and print its html.&lt;/p&gt;
&lt;p&gt;The steps are the same as described in the videos and description on &amp;ldquo;Browser Commands&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Download and import the maven project into Eclipse &amp;ndash;&amp;nbsp;&lt;a href="https://github.com/machzqcq/CucumberJVMExamples"&gt;github.com/.../CucumberJVMExamples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How to download and import has been explained in detail in &amp;ldquo;Browser Commands&amp;rdquo; page video at the bottom&lt;/p&gt;
&lt;p&gt;There are two features &amp;ldquo;WebElements.feature&amp;rdquo; and &amp;ldquo;HtmlLocators.feature&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Their corresponding step_definitions are in the files &amp;ldquo;WebElements.java&amp;rdquo; and &amp;ldquo;HtmlLocators.java&amp;rdquo; [Mapping 1-1 feature to step definition is not a good practice as per cucumber, but for now our focus is to learn selenium java api first, so we can refactor this code later]&lt;/p&gt;
&lt;p&gt;Cucumber Features&lt;/p&gt;
&lt;p&gt;WebElements.feature&lt;/p&gt;
&lt;p&gt;Feature: Demonstrating the usage of web elements&lt;/p&gt;
&lt;p&gt;Scenario: Identify text field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find first and last name and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify link field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find menu and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify button field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find button and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify radio button and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find radio button male and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify checkbox and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find check box and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify select list and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find select list and print html&lt;/p&gt;
&lt;p&gt;Scenario: Identify another select list and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find another select list and print html&lt;/p&gt;
&lt;p&gt;Scenario: Identify a div and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find div and print html&lt;/p&gt;
&lt;p&gt;Feature: Demonstrating the usage of web elements&lt;/p&gt;
&lt;p&gt;Scenario: Identify text field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find first and last name and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify link field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find menu and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify button field and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find button and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify radio button and print its html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find radio button male and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify checkbox and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find check box and print the html&lt;/p&gt;
&lt;p&gt;Scenario: Identify select list and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find select list and print html&lt;/p&gt;
&lt;p&gt;Scenario: Identify another select list and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find another select list and print html&lt;/p&gt;
&lt;p&gt;Scenario: Identify a div and print html&lt;/p&gt;
&lt;p&gt;When I open practiceselenium.com website&lt;/p&gt;
&lt;p&gt;Then I find div and print html&lt;/p&gt;
&lt;p&gt;HtmlLocators.feature&lt;/p&gt;
&lt;p&gt;Feature: Use html locators&lt;/p&gt;
&lt;p&gt;Scenario: Identify html element&lt;/p&gt;
&lt;p&gt;When I login to practiceselenium website&lt;/p&gt;
&lt;p&gt;Then I access elements and use watir commands&lt;/p&gt;
&lt;p&gt;Feature: Use html locators&lt;/p&gt;
&lt;p&gt;Scenario: Identify html element&lt;/p&gt;
&lt;p&gt;When I login to practiceselenium website&lt;/p&gt;
&lt;p&gt;Then I access elements and use watir commands&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find elements in interface Selenium</title><link>https://community.appian.com/thread/57087?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 09:47:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bb025dd3-60e8-44f1-b657-fa26d3b2b82e</guid><dc:creator>Shiva Valusa</dc:creator><description>Hi danielh855,&lt;br /&gt;
&lt;br /&gt;
Please refer below link to see Appian SAIL components.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.2/SAIL_Components.html"&gt;docs.appian.com/.../SAIL_Components.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>