java - action.keyDown(Keys.CONTROL).sendKeys("a").keyUp(Keys.CONTROL).build() works on windows but doesn't work on linux -


action.keydown(keys.control).sendkeys("a").keyup(keys.control).build() works fine on windows doesn't work on linux. writing testcase using selenium webdriver , trying select text written in rich textbox , have used code snippet perform select command.it works fine on windows on firefox 38 browser when run testcases on jenkins machine linux machine,browser firefox(don't know exact version above version 33) code snippet doesn't work.i have tried alternatives driver.findelement(by.cssselector("body")).sendkeys(keys.chord(keys.control, "a")); , double click on rich textbox select text written in nothing works.what reason,why these code snippets not working on linux machine.

i have found answer own question action.keydown(keys.control).sendkeys("a").keyup(keys.control).build() , driver.findelement(by.cssselector("body")).sendkeys(keys.chord(keys.control, "a"));was not running on linux machine firefox browser because native events not enabled in driver factory.to enable native events need write following code in driver factory i.e required driver created

 firefoxprofile profile = new firefoxprofile();     profile.setenablenativeevents(true);     firefoxdriver driver = new firefoxdriver(profile); 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -