diff --git a/repository/Parasol-Core.package/BPWebElement.class/instance/submit.st b/repository/Parasol-Core.package/BPWebElement.class/instance/submit.st new file mode 100644 index 0000000..337958a --- /dev/null +++ b/repository/Parasol-Core.package/BPWebElement.class/instance/submit.st @@ -0,0 +1,9 @@ +events +submit + " + https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/WebElement.html#submit() + " + + driver + httpPostHandleResponse: (self baseElementURL , 'submit') + jsonData: Dictionary new \ No newline at end of file diff --git a/repository/Parasol-Tests.package/BPWebElementTestCase.class/instance/testSendKeys.st b/repository/Parasol-Tests.package/BPWebElementTestCase.class/instance/testSendKeys.st index 9a2f963..1eea933 100644 --- a/repository/Parasol-Tests.package/BPWebElementTestCase.class/instance/testSendKeys.st +++ b/repository/Parasol-Tests.package/BPWebElementTestCase.class/instance/testSendKeys.st @@ -4,6 +4,7 @@ testSendKeys | inputElement submitButton submittedValue | self assert: self componentUnderTest inputFieldValue isNil. inputElement := driver findElementByID: 'inputField'. + inputElement click. inputElement sendKeys: 'foo' , (String with: BPKeys shift) , 'bar' , (String with: BPKeys shift) , 'baz' , @@ -11,7 +12,7 @@ testSendKeys inputElement sendKeys: 'quux'. inputElement sendKeys: 'QU' , (String with: BPKeys shift) , 'UZna' , (String with: BPKeys shift) , 'rf'. submitButton := driver findElementByID: 'submitButton'. - submitButton click. + submitButton submit. submittedValue := self waitUntil: [ self componentUnderTest inputFieldValue ] is: [ :value | value notNil ] checkEvery: (Duration milliseconds: 100) timeoutAfter: (Duration seconds: 5) with: [ nil ]. self assert: submittedValue equals: 'fooBARbazQUXquuxQUUZNArf'.