test_class.file: karate-core/src/test/java/com/intuit/karate/driver/ElementFinderTest.java
test_class.identifier: ElementFinderTest
test_case.body: @Test
      public void testToJson() {
          String condition = ElementFinder.exitCondition("{^a}Foo");
          assertEquals("e.textContent.trim().includes('Foo') && e.tagName == 'A'", condition);
      }
test_case.class_method_signature: ElementFinderTest.testToJson()
test_case.full_signature: @Test public void testToJson()
test_case.identifier: testToJson
test_case.invocations: exitCondition assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToJson()
focal_class.declarator: driver
focal_class.modifier: private final
focal_class.original_string: private final Driver driver;
focal_class.type: Driver
focal_class.var_name: driver
focal_class.declarator: fromLocator
focal_class.modifier: private final
focal_class.original_string: private final String fromLocator;
focal_class.type: String
focal_class.var_name: fromLocator
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final Type type;
focal_class.type: Type
focal_class.var_name: type
focal_class.declarator: tag = "INPUT"
focal_class.modifier: private
focal_class.original_string: private String tag = "INPUT";
focal_class.type: String
focal_class.var_name: tag
focal_class.file: karate-core/src/main/java/com/intuit/karate/driver/ElementFinder.java
focal_class.identifier: ElementFinder
focal_class.interfaces: implements Finder
focal_class.class_method_signature: ElementFinder.ElementFinder(Driver driver, String fromLocator, Type type)
focal_class.full_signature: public  ElementFinder(Driver driver, String fromLocator, Type type)
focal_class.identifier: ElementFinder
focal_class.modifiers: public
focal_class.parameters: (Driver driver, String fromLocator, Type type)
focal_class.signature:  ElementFinder(Driver driver, String fromLocator, Type type)
focal_class.class_method_signature: ElementFinder.forLoopChunk(ElementFinder.Type type)
focal_class.full_signature: private static String forLoopChunk(ElementFinder.Type type)
focal_class.identifier: forLoopChunk
focal_class.modifiers: private static
focal_class.parameters: (ElementFinder.Type type)
focal_class.return: String
focal_class.signature: String forLoopChunk(ElementFinder.Type type)
focal_class.class_method_signature: ElementFinder.exitCondition(String findTag)
focal_class.full_signature: public static String exitCondition(String findTag)
focal_class.identifier: exitCondition
focal_class.modifiers: public static
focal_class.parameters: (String findTag)
focal_class.return: String
focal_class.signature: String exitCondition(String findTag)
focal_class.class_method_signature: ElementFinder.findScript(Driver driver, String locator, ElementFinder.Type type, String findTag)
focal_class.full_signature: private static String findScript(Driver driver, String locator, ElementFinder.Type type, String findTag)
focal_class.identifier: findScript
focal_class.modifiers: private static
focal_class.parameters: (Driver driver, String locator, ElementFinder.Type type, String findTag)
focal_class.return: String
focal_class.signature: String findScript(Driver driver, String locator, ElementFinder.Type type, String findTag)
focal_class.class_method_signature: ElementFinder.getDebugString()
focal_class.full_signature: private String getDebugString()
focal_class.identifier: getDebugString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDebugString()
focal_class.class_method_signature: ElementFinder.find()
focal_class.full_signature: @Override public Element find()
focal_class.identifier: find
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element find()
focal_class.class_method_signature: ElementFinder.find(String tag)
focal_class.full_signature: @Override public Element find(String tag)
focal_class.identifier: find
focal_class.modifiers: @Override public
focal_class.parameters: (String tag)
focal_class.return: Element
focal_class.signature: Element find(String tag)
focal_class.class_method_signature: ElementFinder.clear()
focal_class.full_signature: @Override public Element clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element clear()
focal_class.class_method_signature: ElementFinder.input(String value)
focal_class.full_signature: @Override public Element input(String value)
focal_class.identifier: input
focal_class.modifiers: @Override public
focal_class.parameters: (String value)
focal_class.return: Element
focal_class.signature: Element input(String value)
focal_class.class_method_signature: ElementFinder.select(String value)
focal_class.full_signature: @Override public Element select(String value)
focal_class.identifier: select
focal_class.modifiers: @Override public
focal_class.parameters: (String value)
focal_class.return: Element
focal_class.signature: Element select(String value)
focal_class.class_method_signature: ElementFinder.select(int index)
focal_class.full_signature: @Override public Element select(int index)
focal_class.identifier: select
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: Element
focal_class.signature: Element select(int index)
focal_class.class_method_signature: ElementFinder.click()
focal_class.full_signature: @Override public Element click()
focal_class.identifier: click
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element click()
focal_class.class_method_signature: ElementFinder.highlight()
focal_class.full_signature: @Override public Element highlight()
focal_class.identifier: highlight
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element highlight()
focal_class.class_method_signature: ElementFinder.retry()
focal_class.full_signature: @Override public Element retry()
focal_class.identifier: retry
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element retry()
focal_class.class_method_signature: ElementFinder.retry(int count)
focal_class.full_signature: @Override public Element retry(int count)
focal_class.identifier: retry
focal_class.modifiers: @Override public
focal_class.parameters: (int count)
focal_class.return: Element
focal_class.signature: Element retry(int count)
focal_class.class_method_signature: ElementFinder.retry(Integer count, Integer interval)
focal_class.full_signature: @Override public Element retry(Integer count, Integer interval)
focal_class.identifier: retry
focal_class.modifiers: @Override public
focal_class.parameters: (Integer count, Integer interval)
focal_class.return: Element
focal_class.signature: Element retry(Integer count, Integer interval)
focal_method.body: public static String exitCondition(String findTag) {
          int pos = findTag.indexOf('}');
          if (pos == -1) {
              return "e.tagName == '" + findTag.toUpperCase() + "'";
          }
          int caretPos = findTag.indexOf('^');        
          boolean contains = caretPos != -1 && caretPos < pos;
          if (!contains) {
              caretPos = 0;
          }
          String tagName = StringUtils.trimToNull(findTag.substring(caretPos + 1, pos));
          String suffix = tagName == null ? "" : " && e.tagName == '" + tagName.toUpperCase() + "'";
          String findText = findTag.substring(pos + 1);        
          if (contains) {
              return "e.textContent.trim().includes('" + findText + "')" + suffix;
          } else {
              return "e.textContent.trim() == '" + findText + "'" + suffix;
          }
      }
focal_method.class_method_signature: ElementFinder.exitCondition(String findTag)
focal_method.full_signature: public static String exitCondition(String findTag)
focal_method.identifier: exitCondition
focal_method.invocations: indexOf toUpperCase indexOf trimToNull substring toUpperCase substring
focal_method.modifiers: public static
focal_method.parameters: (String findTag)
focal_method.return: String
focal_method.signature: String exitCondition(String findTag)