In a project, I'm trying to test a form submit. During the form filling, there are fields which are automatically filled by a JS code using other fields values. In some cases, I need to overwrite the autogenerated value with another for the test purpose but I must wait for the JS to set the value field before the override. I tried achieving it with the code below but I get an issue: strpos(): Empty needle
If there is another way to achieve what I need to do I'm all ears. When I get a little more time I may open a PR with a fix but in the meantime, if anyone is able to do it or has a better solution, go for it.
In a project, I'm trying to test a form submit. During the form filling, there are fields which are automatically filled by a JS code using other fields values. In some cases, I need to overwrite the autogenerated value with another for the test purpose but I must wait for the JS to set the value field before the override. I tried achieving it with the code below but I get an issue:
strpos(): Empty needle
The issue appears to be in file
PantherWebDriverExpectedCondition.php
where if$text = ''
thestrpos
call fails.For now, I simply created my own method :
If there is another way to achieve what I need to do I'm all ears. When I get a little more time I may open a PR with a fix but in the meantime, if anyone is able to do it or has a better solution, go for it.