{"id":14150,"date":"2013-06-14T19:00:39","date_gmt":"2013-06-14T16:00:39","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=14150"},"modified":"2013-06-14T11:22:57","modified_gmt":"2013-06-14T08:22:57","slug":"java-testing-with-selenium-and-dynamic-ids-in-html","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html","title":{"rendered":"Java testing with Selenium and dynamic ids in html"},"content":{"rendered":"<p>One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test.<\/p>\n<p>Firstly, I&#8217;ll install Selenium in Firefox (as this is the official version) and record a quick test.\u00a0 It&#8217;s important to note that Selenium will give you a number of different ways to remember which html tag you invoked.\u00a0 For instance, it can just invoke a specific id on a page.<\/p>\n<p>However, when using a portal system like say JSF under Liferay, the id values are generated on the fly, so you&#8217;d record one test, then never be able to run it successfully again.<\/p>\n<p>One really nice feature of Selenium is you can invoke a HTML xpath so in the Liferay example, your code would still find the tag it needed to click.\u00a0 Lets say I record myself logging into the page below&#8230;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/login.png\"><img decoding=\"async\" class=\"aligncenter\" style=\"border: 0px none;\" alt=\"\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/login.png\" width=\"320\" height=\"161\" border=\"0\" \/><\/a><\/p>\n<p>Now because this page is generated with liferay, I can see the input text id for the form is&#8230;<\/p>\n<pre class=\"brush:xml\">&lt;input aria-required=\"true\" class=\"aui-field-input\r\naui-field-input-text aui-form-validator-error\" id=\"_58_login\" \r\nname=\"_58_login\" type=\"text\" value=\"\" \/&gt;<\/pre>\n<p>As JSF under Liferay will create a new id quite regularly for this textbox (each time the server is restarted I believe, although it may be even more frequent), this means we can&#8217;t just get the id and hook into that, as the tests will only ever run once.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/blogselenium.png\"><img decoding=\"async\" class=\"aligncenter\" style=\"border: 0px none;\" alt=\"\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/blogselenium.png\" width=\"589\" height=\"466\" border=\"0\" \/><\/a><\/p>\n<p>What we can do however is hook into liferay by using the html tag directly as this won&#8217;t be different each time Liferay loads the JSF.\u00a0 I noticed I had to use this same technique for every page in Liferay as the id for nearly all the html rendered through JSF had a different id each time the page was accessed.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/blogselen2.png\"><img decoding=\"async\" class=\"aligncenter\" style=\"border: 0px none;\" alt=\"\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/blogselen2.png\" width=\"589\" height=\"466\" border=\"0\" \/><\/a><\/p>\n<p>We can then export this to a junit class from the file menu File | Export Test Case As&#8230; | Java \/ JUnit 4 \/ Web Driver which would give us the following class to run and test.<\/p>\n<pre class=\"brush:java\">\r\nimport static org.junit.Assert.fail;\r\n\r\nimport java.util.concurrent.TimeUnit;\r\n\r\nimport org.junit.After;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\nimport org.openqa.selenium.By;\r\nimport org.openqa.selenium.WebDriver;\r\nimport org.openqa.selenium.firefox.FirefoxDriver;\r\n\r\npublic class TestExample {\r\n  private WebDriver driver;\r\n  private String baseUrl;\r\n  private StringBuffer verificationErrors = new StringBuffer();\r\n\r\n  @Before\r\n  public void setUp() throws Exception {\r\n    driver = new FirefoxDriver();\r\n    baseUrl = \"http:\/\/localhost:8080\";\r\n    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n  }\r\n\r\n  @Test\r\n  public void testExample() throws Exception {\r\n    driver.get(baseUrl + \"\/en_GB\/web\/myapp\/home?p_p_id=58&amp;p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_mode=view&amp;saveLastPath=0&amp;_58_struts_action=%2Flogin%2Flogin\");\r\n    driver.findElement(By.xpath(\"\/\/span\/input\")).clear();\r\n    driver.findElement(By.xpath(\"\/\/span\/input\")).sendKeys(\"user\");\r\n    driver.findElement(By.xpath(\"\/\/span[2]\/span\/span\/input\")).clear();\r\n    driver.findElement(By.xpath(\"\/\/span[2]\/span\/span\/input\")).sendKeys(\"pass\");\r\n    driver.findElement(By.xpath(\"\/\/div\/span\/span\/input\")).click();\r\n  }\r\n\r\n  @After\r\n  public void tearDown() throws Exception {\r\n    driver.quit();\r\n    String verificationErrorString = verificationErrors.toString();\r\n    if (!\"\".equals(verificationErrorString)) {\r\n      fail(verificationErrorString);\r\n    }\r\n  }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/codemumble.blogspot.com\/2013\/06\/java-testing-with-selenium-and-dynamic.html\">Java testing with Selenium and dynamic ids in html<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> David Gray at the <a href=\"http:\/\/codemumble.blogspot.com\/\">Code Mumble<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I&#8217;ll install Selenium in Firefox (as this is the official version) and record a quick test.\u00a0 It&#8217;s important to note that Selenium will give you a number &hellip;<\/p>\n","protected":false},"author":450,"featured_media":231,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[287,273],"class_list":["post-14150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-selenium","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java testing with Selenium and dynamic ids in html<\/title>\n<meta name=\"description\" content=\"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I&#039;ll\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java testing with Selenium and dynamic ids in html\" \/>\n<meta property=\"og:description\" content=\"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I&#039;ll\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-14T16:00:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"David Gray\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/_DavidGray\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Gray\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html\"},\"author\":{\"name\":\"David Gray\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/e737b17be63bc5f2e7c14b8ffe59e397\"},\"headline\":\"Java testing with Selenium and dynamic ids in html\",\"datePublished\":\"2013-06-14T16:00:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html\"},\"wordCount\":347,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/selenium-logo.jpg\",\"keywords\":[\"Selenium\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html\",\"name\":\"Java testing with Selenium and dynamic ids in html\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/selenium-logo.jpg\",\"datePublished\":\"2013-06-14T16:00:39+00:00\",\"description\":\"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I'll\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/selenium-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/selenium-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/java-testing-with-selenium-and-dynamic-ids-in-html.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java testing with Selenium and dynamic ids in html\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/e737b17be63bc5f2e7c14b8ffe59e397\",\"name\":\"David Gray\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g\",\"caption\":\"David Gray\"},\"description\":\"David is a software engineer with a passion for everything Java and the web. He is a server side java developer based in Derby, England by day and a Android, jQuery, jack of all trades by night.\",\"sameAs\":[\"http:\\\/\\\/codemumble.blogspot.com\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/in\\\/davidgrayjava\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/_DavidGray\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/david-gray\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java testing with Selenium and dynamic ids in html","description":"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I'll","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html","og_locale":"en_US","og_type":"article","og_title":"Java testing with Selenium and dynamic ids in html","og_description":"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I'll","og_url":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-06-14T16:00:39+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg","type":"image\/jpeg"}],"author":"David Gray","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/_DavidGray","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"David Gray","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html"},"author":{"name":"David Gray","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/e737b17be63bc5f2e7c14b8ffe59e397"},"headline":"Java testing with Selenium and dynamic ids in html","datePublished":"2013-06-14T16:00:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html"},"wordCount":347,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg","keywords":["Selenium","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html","url":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html","name":"Java testing with Selenium and dynamic ids in html","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg","datePublished":"2013-06-14T16:00:39+00:00","description":"One of the cool aspects of Selenium, is that not only can you record yourself using a site, you can actually run this as a junit test. Firstly, I'll","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/selenium-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/java-testing-with-selenium-and-dynamic-ids-in-html.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Java testing with Selenium and dynamic ids in html"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/e737b17be63bc5f2e7c14b8ffe59e397","name":"David Gray","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/857980653a3d30028da867a449344cad0ab5672bdba79c65a09ffe376f18b26d?s=96&d=mm&r=g","caption":"David Gray"},"description":"David is a software engineer with a passion for everything Java and the web. He is a server side java developer based in Derby, England by day and a Android, jQuery, jack of all trades by night.","sameAs":["http:\/\/codemumble.blogspot.com\/","http:\/\/www.linkedin.com\/in\/davidgrayjava","https:\/\/x.com\/https:\/\/twitter.com\/_DavidGray"],"url":"https:\/\/www.javacodegeeks.com\/author\/david-gray"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/450"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=14150"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14150\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/231"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=14150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=14150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=14150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}