Selenium Hovering mouse and click

At EM after we started using third party vendor for launching surveys. For legacy issues we had still configure survey on our end and also on the third party vendor. Putting the survey logic, formatting the display all used to take for at least thirty minutes. Every day we had at least ten to twenty surveys to be set up by the support team. Since EM catered for demographic surveys, research group, pooling surveys, CI/CMs. There was no API setup from the third party vendor so have . I decided to automate the whole process with selenium and situation rose that in I have to automate hovering the mouse and click a menu item.

Luckily Selenium had this feature and they call them as collective actions. Here is the code snippet


WebElement we = driver.findElement(By.xpath("//*[@id=\"QuestionList\"]/form/table/tbody/tr[2]/td"));
        actions.moveToElement(we).moveToElement(driver.findElement(By.cssSelector("span.blueBottonSmall"))).click().build().perform();

Selenium crashing for large strings in sendKeys

I had to automate setting up surveys on third party system since they din’t had bulk creation of surveys. As a part of survey setup we had huge css file (more than 10,000 bytes) to be setup on each survey.

When i tried to send the string in one go it was Selenium was crashing out both on Firefox and Chrome driver.

Got around by sending the text in chunks and calling sendKeys in a loop.