Selenium Actions not working with version 3.141.59How does the Java 'for each' loop work?How do servlets work? Instantiation, sessions, shared variables and multithreadingHow to take screenshot with Selenium WebDriverDifferences between action and actionListenerGetting the Current Working Directory in JavaHow to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor versionMoving from Selenium IDE to what?Maven update versions goal builds old version in JenkinsSelenium hangs when starting new remoteWebDriver session using Microsoft Edge web browser on Windows 10 VMActions class in selenium 3.3.1 deprecated looking for solution with contextClick
Dotted background on a flowchart
Can someone identify this unusual plane at airport?
Should I use the words "pyromancy" and "necromancy" even if they don't mean what people think they do?
Are (c#) dictionaries an Anti Pattern?
Term used to describe a person who predicts future outcomes
How do solar inverter systems easily add AC power sources together?
Videos of surgery
Why did James Cameron decide to give Alita big eyes?
Can a DM change an item given by another DM?
Does trying to charm an uncharmable creature cost a spell slot?
Find most "academic" implementation of doubly linked list
Why did Lucius make a deal out of Buckbeak hurting Draco but not about Draco being turned into a ferret?
How could a self contained organic body propel itself in space
Why is getting a PhD considered "financially irresponsible" by some people?
How do we improve collaboration with problematic tester team?
Could the UK amend the European Withdrawal Act and revoke the Article 50 invocation?
Units in general relativity
Dual of a bimodule
What is the function of modprobe in this code?
Is there a word or phrase that means "use other people's wifi or Internet service without consent"?
Why does matter stay collapsed in the core, following a supernova explosion?
Is it true that different variants of the same model aircraft don't require pilot retraining?
Force SQL Server to use fragmented indexes?
What is Soda Fountain Etiquette?
Selenium Actions not working with version 3.141.59
How does the Java 'for each' loop work?How do servlets work? Instantiation, sessions, shared variables and multithreadingHow to take screenshot with Selenium WebDriverDifferences between action and actionListenerGetting the Current Working Directory in JavaHow to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor versionMoving from Selenium IDE to what?Maven update versions goal builds old version in JenkinsSelenium hangs when starting new remoteWebDriver session using Microsoft Edge web browser on Windows 10 VMActions class in selenium 3.3.1 deprecated looking for solution with contextClick
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
The main issue is that we are trying to update our POM
to use version 3.141.59 of Selenium
. During our update we noticed that we have several errors with Actions
. Upon reading documentation we found that:
"import org.openqa.selenium.interactions.Actions;" has been deprecated
and replaced with "import org.openqa.selenium.interactions.Action".
We want to keep the same behavior and update our code to work with the new import. We have not seen any new documentation of how to actually use it. Below is an example of how we were using the old Actions.
try
Actions actions = new Actions(driver);
actions.moveToElement(searchDocument);
actions.sendKeys(PDF);
Thread.sleep(1000);
actions.build().perform();
catch(Exception e)
I was able to find this note in the change logs on Selenium:
Deprecated the original Actions API in favour of the W3C approach.
java selenium try-catch action pom.xml
add a comment |
The main issue is that we are trying to update our POM
to use version 3.141.59 of Selenium
. During our update we noticed that we have several errors with Actions
. Upon reading documentation we found that:
"import org.openqa.selenium.interactions.Actions;" has been deprecated
and replaced with "import org.openqa.selenium.interactions.Action".
We want to keep the same behavior and update our code to work with the new import. We have not seen any new documentation of how to actually use it. Below is an example of how we were using the old Actions.
try
Actions actions = new Actions(driver);
actions.moveToElement(searchDocument);
actions.sendKeys(PDF);
Thread.sleep(1000);
actions.build().perform();
catch(Exception e)
I was able to find this note in the change logs on Selenium:
Deprecated the original Actions API in favour of the W3C approach.
java selenium try-catch action pom.xml
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.
– supputuri
Mar 27 at 21:09
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43
add a comment |
The main issue is that we are trying to update our POM
to use version 3.141.59 of Selenium
. During our update we noticed that we have several errors with Actions
. Upon reading documentation we found that:
"import org.openqa.selenium.interactions.Actions;" has been deprecated
and replaced with "import org.openqa.selenium.interactions.Action".
We want to keep the same behavior and update our code to work with the new import. We have not seen any new documentation of how to actually use it. Below is an example of how we were using the old Actions.
try
Actions actions = new Actions(driver);
actions.moveToElement(searchDocument);
actions.sendKeys(PDF);
Thread.sleep(1000);
actions.build().perform();
catch(Exception e)
I was able to find this note in the change logs on Selenium:
Deprecated the original Actions API in favour of the W3C approach.
java selenium try-catch action pom.xml
The main issue is that we are trying to update our POM
to use version 3.141.59 of Selenium
. During our update we noticed that we have several errors with Actions
. Upon reading documentation we found that:
"import org.openqa.selenium.interactions.Actions;" has been deprecated
and replaced with "import org.openqa.selenium.interactions.Action".
We want to keep the same behavior and update our code to work with the new import. We have not seen any new documentation of how to actually use it. Below is an example of how we were using the old Actions.
try
Actions actions = new Actions(driver);
actions.moveToElement(searchDocument);
actions.sendKeys(PDF);
Thread.sleep(1000);
actions.build().perform();
catch(Exception e)
I was able to find this note in the change logs on Selenium:
Deprecated the original Actions API in favour of the W3C approach.
java selenium try-catch action pom.xml
java selenium try-catch action pom.xml
edited Mar 28 at 22:13
Tyler Pranger
asked Mar 27 at 20:23
Tyler PrangerTyler Pranger
1167 bronze badges
1167 bronze badges
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.
– supputuri
Mar 27 at 21:09
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43
add a comment |
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.
– supputuri
Mar 27 at 21:09
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.– supputuri
Mar 27 at 21:09
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.– supputuri
Mar 27 at 21:09
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43
add a comment |
1 Answer
1
active
oldest
votes
Here is the simple example if it's helpful.
Actions actions = new Actions(driver);
// create the mouserover action
Action mouseOverOnElement = actions.moveToElement(linkMenu).build();
// get the back ground color before mouse over
String bgColor = linkMenu.getCssValue("background-color");
System.out.println("Before hover: " + bgColor);
// perform the mouseover operation
mouseOverOnElement.perform();
// get the back ground color after mouse over
bgColor = linkMenu.getCssValue("background-color");
System.out.println("After hover: " + bgColor);
Selenium Doc: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Action.html
Actions actions = new Actions(driver);
does not work, it throws an error.
– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to changeActions
toAction
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.
– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385841%2fselenium-actions-not-working-with-version-3-141-59%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is the simple example if it's helpful.
Actions actions = new Actions(driver);
// create the mouserover action
Action mouseOverOnElement = actions.moveToElement(linkMenu).build();
// get the back ground color before mouse over
String bgColor = linkMenu.getCssValue("background-color");
System.out.println("Before hover: " + bgColor);
// perform the mouseover operation
mouseOverOnElement.perform();
// get the back ground color after mouse over
bgColor = linkMenu.getCssValue("background-color");
System.out.println("After hover: " + bgColor);
Selenium Doc: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Action.html
Actions actions = new Actions(driver);
does not work, it throws an error.
– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to changeActions
toAction
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.
– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
|
show 1 more comment
Here is the simple example if it's helpful.
Actions actions = new Actions(driver);
// create the mouserover action
Action mouseOverOnElement = actions.moveToElement(linkMenu).build();
// get the back ground color before mouse over
String bgColor = linkMenu.getCssValue("background-color");
System.out.println("Before hover: " + bgColor);
// perform the mouseover operation
mouseOverOnElement.perform();
// get the back ground color after mouse over
bgColor = linkMenu.getCssValue("background-color");
System.out.println("After hover: " + bgColor);
Selenium Doc: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Action.html
Actions actions = new Actions(driver);
does not work, it throws an error.
– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to changeActions
toAction
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.
– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
|
show 1 more comment
Here is the simple example if it's helpful.
Actions actions = new Actions(driver);
// create the mouserover action
Action mouseOverOnElement = actions.moveToElement(linkMenu).build();
// get the back ground color before mouse over
String bgColor = linkMenu.getCssValue("background-color");
System.out.println("Before hover: " + bgColor);
// perform the mouseover operation
mouseOverOnElement.perform();
// get the back ground color after mouse over
bgColor = linkMenu.getCssValue("background-color");
System.out.println("After hover: " + bgColor);
Selenium Doc: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Action.html
Here is the simple example if it's helpful.
Actions actions = new Actions(driver);
// create the mouserover action
Action mouseOverOnElement = actions.moveToElement(linkMenu).build();
// get the back ground color before mouse over
String bgColor = linkMenu.getCssValue("background-color");
System.out.println("Before hover: " + bgColor);
// perform the mouseover operation
mouseOverOnElement.perform();
// get the back ground color after mouse over
bgColor = linkMenu.getCssValue("background-color");
System.out.println("After hover: " + bgColor);
Selenium Doc: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Action.html
edited Mar 27 at 23:08
answered Mar 27 at 22:57
supputurisupputuri
6,4352 gold badges8 silver badges24 bronze badges
6,4352 gold badges8 silver badges24 bronze badges
Actions actions = new Actions(driver);
does not work, it throws an error.
– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to changeActions
toAction
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.
– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
|
show 1 more comment
Actions actions = new Actions(driver);
does not work, it throws an error.
– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to changeActions
toAction
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.
– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
Actions actions = new Actions(driver);
does not work, it throws an error.– Tyler Pranger
Mar 28 at 2:43
Actions actions = new Actions(driver);
does not work, it throws an error.– Tyler Pranger
Mar 28 at 2:43
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
I am able to use that without issue with latest selenium version 3.141.59 . Here is my maven dependency
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>
– supputuri
Mar 28 at 3:09
Yeah it tells me that I need to change
Actions
to Action
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.– Tyler Pranger
Mar 28 at 14:58
Yeah it tells me that I need to change
Actions
to Action
and I am calling the selenium dependency the same way you are. I am confused as to why it would be working for you.– Tyler Pranger
Mar 28 at 14:58
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
I was able to find this in the change logs "Deprecated the original Actions API in favour of the W3C approach", would you know how to use this at all?
– Tyler Pranger
Mar 28 at 22:13
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
still wondering why it's working for me when we both have the same version. Can you just add only selenium java dependency (remove all other) and see what happens.
– supputuri
Mar 28 at 22:18
|
show 1 more comment
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385841%2fselenium-actions-not-working-with-version-3-141-59%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action void perform();
that's all I see under Action interface.– supputuri
Mar 27 at 21:09
I have seen the documentation of what you are talking about. The issue I have is the implementation of the new interactions.
– Tyler Pranger
Mar 27 at 22:43