All
None
Product
All
None
Product
All
None
Product
{"ScriptPreparationCode":null,"TestCases":[{"Name":"Javascript loop through elements","Code":"/*let productTables = document.querySelectorAll(\u0027.productsTable\u0027);\r\n\r\n productTables.forEach((table) =\u003E {\r\n const elementStyle = window.getComputedStyle(table);\r\n if (!((elementStyle.display === \u0027none\u0027)\r\n || (elementStyle.visibility === \u0027hidden\u0027))) return table;\r\n});\r\n*/\r\n\r\nlet productTables = document.querySelectorAll(\u0027.productsTable\u0027);\r\n\r\nconst isVisible = function(element) {\r\n const element2 = $(element);\r\n return !(/none/i.test(element2.css(\u0027display\u0027)))\r\n \u0026\u0026 !(/hidden/i.test(element2.css(\u0027visibility\u0027)));\r\n }\r\n\r\nproductTables.forEach((table) =\u003E {\r\n if (isVisible(table)) return table;\r\n});\r\n\r\n","IsDeferred":false},{"Name":"jQuery find visible element","Code":"productTables = $(\u0027.productsTable:visible\u0027);","IsDeferred":false}]}