Good day. it is required to select several blocks by clicking on each one, but shift must be clamped, that is, first one element (then the second and the third are clamped). Similarly, we select for example the necessary folders in the file manager. can this be done using codeception or native methods?
2 answers
I will answer myself
$I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) { $el = $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('#testTarget')); $webdriver->action()->sendKeys(null, WebDriverKeys::SHIFT)->click($el)->perform(); }); |
Try pressing Shift like this:
$I->pressKey('#input',WebDriverKeys::LEFT_SHIFT); - Unfortunately, this does not work, because, you have to press shift and then click the click without releasing the shift, it works separately, of course, experimented here: spookandpuff.com/examples/clickSimulation.html - dm1tr1yantonov
|
c#.... - tCode