Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "\WebDriver\Session::frame" isn't serializing arguments #131

Closed
aik099 opened this issue Feb 23, 2024 · 3 comments
Closed

The "\WebDriver\Session::frame" isn't serializing arguments #131

aik099 opened this issue Feb 23, 2024 · 3 comments

Comments

@aik099
Copy link
Contributor

aik099 commented Feb 23, 2024

According to the https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidframe it is possible to specify a JSON reference to a WebElement for frame identification.

When attempting to do so using this code I'm getting an exception from the \WebDriver\AbstractWebDriver::assertSerializable method:

$webElement = $webDriver->element('id', 'my_frame_id');
$webDriver->frame(array('id' => $webElement));

This is happening because the \WebDriver\Element class object isn't converted to a JSON interpretation. The only methods, that do serialization are \WebDriver\Session::execute and \WebDriver\Session::execute_async.

P.S.
I've checked other places in the code and this is the only one, where proper serialization is missing.

@aik099
Copy link
Contributor Author

aik099 commented Feb 23, 2024

PR for 1.x branch added:

As for the master I have no idea how to implement it without a code duplication.

@aik099
Copy link
Contributor Author

aik099 commented Mar 18, 2024

@robocoder , any ideas on how to fix this in the master branch?

@robocoder
Copy link
Member

This should be fixed in master now.

andriokha added a commit to FabbDev/php-webdriver that referenced this issue Jun 29, 2024
andriokha added a commit to FabbDev/php-webdriver that referenced this issue Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants