When the click method is executed on a checkbox in Selenium 4.8.0, the following error appears:
non-positive contentLength: 0
Call Webdriver\Element::click method on a checkbox with this library, using Selenium 4.8.0.
Send the :id attribute in the POST request. This solution is based in how this is done at php-webdriver/webdriver
This PR actually breaks click
. This library is not a fork of php-webdriver/webdriver
, and specifically doesn't use the :id
placeholder.
I know the command is unsupported in the W3C spec but I can't ignore the BC aspect of this library.
Skip keyboard events test
tweaking error handling (again)
tweaking error handling (again)
Fix semantic change introduced by ed8f7741
Fix semantic change introduced by 9fef2b75
#118 doesn't seem to be fixed - as the command is still listed an UnknownCommand
exception is never raised.
For example this call in MinkSelenium2Driver will cause something like the following error:
WebDriver\Exception\ScriptTimeout: Unable to execute request for an existing session: POST /session/1ddbbcdee7165bfc65954ed44175b1f1/moveto
[test:phpunit:functional] Build info: version: '4.3.0', revision: 'a4995e2c09*'
[test:phpunit:functional] System info: host: 'f998d40750df', ip: '172.21.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '5.14.0-1054-oem', java.version: '11.0.15'
[test:phpunit:functional] Driver info: driver.version: unknown
[test:phpunit:functional]
[test:phpunit:functional] /var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:198
[test:phpunit:functional] /var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:174
[test:phpunit:functional] /var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:234
[test:phpunit:functional] /var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:241
[test:phpunit:functional] /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:799
[test:phpunit:functional] /var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:791
[test:phpunit:functional] /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:153
[test:phpunit:functional] /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:161
[test:phpunit:functional] /var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:100
[test:phpunit:functional] /var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:257
[test:phpunit:functional] /var/www/html/web/modules/custom/testmodule/tests/src/ExistingSiteJavascript/ExampleSelenium2DriverTest.php:25
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:673
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:661
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
[test:phpunit:functional] /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
#118 re-opened for further investigation but closing this PR cuz this isn't the fix.
Hey All !
I'm trying to use the new version of "selenium/hub:4.3.0-20220726" and "selenium/node-chrome:4.3.0-20220726" with https://github.com/minkphp/MinkSelenium2Driver but facing a issue related to "clickOnElement()" method
One could say/relay me to MinkSelenium2Driver package discussion, but i still think this is something related to php-webdriver and its method support for webdrivers.
During "clickOnElement()" method, on webdriver the moveto and click() is called.
php-webdriver
throws exception during moveto() action, after POST http://127.0.0.1:4444/wd/hub/session/:sessionId/moveto
, which is accepted by selenium-hub... it returns a response with error details "error": "command unknown"
I've created a Pull-request but i'm not 100% sure whether the approach is the right one (seems to be though) https://github.com/instaclick/php-webdriver/pull/117
I'd appreciate some guidance here
Thank you!
Re-opening for further investigation.
I'd treat them as separate issues for now since they exhibit different behaviour. In #795, it errors during the schema load. Here, the schema loads but it hangs after pressing the button to add an item.
This isn't a regression by 615de2daefd86873532a13e2b84fc1f00907a293 -- before/after that commit, the schema loader dies with "RangeError: Maximum call stack size exceeded"
The 2020-12 spec gives only the following recursive example:
{
"type": "object",
"properties": {
"name": { "type": "string" },
"children": {
"type": "array",
"items": { "$ref": "#" }
}
}
}
Later in the spec, it's alluded that any other recursive schemas are unsupported:
an infinite loop in the resolver ... is explicitly disallowed.
My interpretation is that we should detect/handle the infinite loop gracefully, while supporting this:
{
"definitions": {
"box": {
"type": "array",
"items": {
"oneOf": [
{
"title": "box",
"$ref": "#"
},
{
"title": "letter",
"type": "object"
}
]
}
}
},
"$ref": "#/definitions/box"
}
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ✔️ | Is backward-compatible? | ✔️ | Tests pass? | ✔️ | Fixed issues | #1002, #988 | Updated README/docs? | ❌ | Added CHANGELOG entry? | ❌
$ref
in propertyNames
#/$defs/
(in addition to #/definitions/
)Abandoning this PR/branch due to conflicts with #1082
Linking: #988 / #1082 / #1158
Object with patternProperties not show in editor
Direct link to example: https://json-editor.github.io/json-editor/
{
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"type": "object",
"properties": {
"code": {
"type": "string",
"pattern": "^[01]{1}$"
}
},
"required": [
"code"
]
}
},
"additionalProperties": false
}
Valid result {"0":{"code":"1"},"1":{"code":"1"},}
Fixed by #915
if(schema.$ref && typeof schema.$ref !== "object" && schema.$ref.substr(0,1) !== "#" && schema.$ref.substr(0,3) !== "urn" && !this.refs[schema.$ref]) { refs[schema.$ref] = true; }
Fixed by #933
Fixed by #933
Form is not loading for below schema with $ref values
Consider below JSON Schema:
{ "type": "object", "id": "urn:jsonschema:swift:drivers:nms:traffic:tunnels:core:complexParams:BidirectionalELSPCosParams", "properties": { "mainAcosParamsELSP": { "type": "array", "items": { "type": "object", "id": "urn:jsonschema:swift:drivers:nms:traffic:tunnels:core:complexParams:ELSPCosParams", "properties": { "hasValues": { "type": "boolean" }, "cos": { "type": "string", "enum": [ "COS0", "COS1", "COS2", "COS3", "COS4", "COS5", "COS6", "COS7" ], "default": "" }, "bw": { "type": "number" }, "isAvailable": { "type": "boolean" }, "color": { "type": "string", "enum": [ "GREEN", "YELLOW", "GREEN_AND_YELLOW" ], "default": "" }, "eirMode": { "type": "string", "enum": [ "Auto", "Manual" ], "default": "" }, "eir": { "type": "integer" }, "eirWeight": { "type": "integer" }, "valid": { "type": "boolean" }, "available": { "type": "boolean" }, "bwValid": { "type": "boolean" } } } }, "mainZcosParamsELSP": { "type": "array", "items": { "type": "object", "$ref": "#urn:jsonschema:swift:drivers:nms:traffic:tunnels:core:complexParams:ELSPCosParams" } }, "protectionAcosParamsELSP": { "type": "array", "items": { "type": "object", "$ref": "#urn:jsonschema:swift:drivers:nms:traffic:tunnels:core:complexParams:ELSPCosParams" } }, "protectionZcosParamsELSP": { "type": "array", "items": { "type": "object", "$ref": "#urn:jsonschema:swift:drivers:nms:traffic:tunnels:core:complexParams:ELSPCosParams" } } } }
Form NOT loaded with properties for mainZcosParamsELSP,protectionAcosParamsELSP & protectionZcosParamsELSP
Copy paste above posted schema and click generate form Direct link to example: https://pmk65.github.io/jedemov2/dist/demo.html?schema=EQbwOgdgBFbALgTwA4FM4C5bAPYCMArVAY3jgBpIY4BLAE02wFcAnCDAgZxwk%2BIAtUAWwCGGTgHcaAM3gY6LGgDdULThghD18FiOnSaxDPCYQIqADbriOFqgw2hyC6gAeABRG6tGAEL0aO1IaHhELAFEAGQBldwBhHE5Pb04KKmxkFhw0FngaVFTgLHBoGDLqYFEaCABBGySvES0o2MYS8oqkNEY4L11ENNLy2nhhQuL0juwu9CLsfCJSQamK%2Bh7gVnYuHj5BUXEpWXlFFTUNHx09AyMTM0trW3tHZzdkpvUW%2BMS3rWWVuEy2VUeQKbUm%2F2A%2FBEnAAamEmKC5u0VsMEChZlg4HgcDgXCIIHBwVMAL6UIYQ%2Bpg8kouAzdacHTVADmfxRFVQECYQkYAG0iWy4HEAPLRAAMrLZFWF0QAjBLJYKRQAmeUC4DSgDMqpp6pFABZtRDpQBWQ1TRXRABsZo6FoA7ITqSsALpkyUVOioaQiJgWMhzQnAfnlUnBspYiRU93TdHrTlCPCqR2S0NO1E0Tg1JQiGgWER4FxR9202MB4DY3GofHJtmphXAGwWWxF%2Bt0ssMxQQFn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=ETI%3D&theme=bootstrap3&iconlib=bootstrap3&object_layout=normal&template=default&show_errors=interaction&required_by_default=1&no_additional_properties=0&display_required_only=0&remove_empty_properties=0&keep_oneof_values=1&ajax=1&ajaxCredentials=1&show_opt_in=0&disable_edit_json=0&disable_collapse=0&disable_properties=0&disable_array_add=0&disable_array_reorder=0&disable_array_delete=0&enable_array_copy=0&array_controls_top=0&disable_array_delete_all_rows=0&disable_array_delete_last_row=0&prompt_before_delete=1&lib_aceeditor=0&lib_autocomplete=0&lib_sceditor=0&lib_simplemde=0&lib_select2=0&lib_selectize=0&lib_choices=0&lib_flatpickr=0&lib_signaturepad=0&lib_mathjs=0&lib_cleavejs=0&lib_jodit=0&lib_jquery=0&lib_dompurify=1