Open GoogleCodeExporter opened 9 years ago
I've run across the same bug. I am using:
Java selenium-chrome-driver 2.44.0
native chromedriver 2.12
I am invoking:
actions.contextClick(nextButton).sendKeys("t").perform();
Under Chrome, the context menu pops up but the keys are never sent. Under
Firefox, the content menu pops up and the keys are sent.
Original comment by cow...@bbs.darktech.org
on 28 Oct 2014 at 5:31
The alternative I'm currently using (with chromedriver 2.12):
Select select = new Select(dropdown);
select.selectByVisibleText("Option 1");
dropdown.sendKeys(Keys.ENTER);
Original comment by bryan.go...@gmail.com
on 29 Oct 2014 at 1:54
Unfortunately, this will not work for me. Context menus are not HTML elements,
so the only way to interact them is using the keyboard or mouse.
Thanks for the suggestion nonetheless.
Original comment by cow...@bbs.darktech.org
on 29 Oct 2014 at 2:56
I understand and prefer to have Selenium interact with elements as a user would
in the real world, so I definitely would like to see a fix to this.
Original comment by bryan.go...@gmail.com
on 29 Oct 2014 at 3:39
Original comment by andrewch...@chromium.org
on 8 Dec 2014 at 8:05
I tested it with chromedriver 2.12 + chrome 39
it will select option 2 - same result as Firefox
let me know you are still having problem.
Original comment by andrewch...@chromium.org
on 8 Dec 2014 at 8:31
Andrew,
This issue contains different code sniplets. Which ones did you test and work
for you?
Thanks...
Original comment by cow...@bbs.darktech.org
on 12 Dec 2014 at 6:15
Finally, Option 2 is selected - same as Firefox.
Original comment by andrewch...@chromium.org
on 12 Dec 2014 at 7:09
Andrew,
Does comment 1 work for you? Meaning:
actions.contextClick(nextButton).sendKeys("t").perform();
Where "nextButton" is a link. This is supposed to open the link in a new tab.
Notice that I reported this against version 2.12 and I believe I was also using
Chrome 39.
Original comment by cow...@bbs.darktech.org
on 12 Dec 2014 at 10:40
please provide me one piece of codes that I can run to show the problem.
how/where do I run
actions.contextClick(nextButton).sendKeys("t").perform(); ?
Original comment by andrewch...@chromium.org
on 13 Dec 2014 at 12:10
Andrew,
1. Go to http://www.google.com/
2. Set nextButton = "images" link in the top right corner
3. Run: actions.contextClick(nextButton).sendKeys("t").perform();
4. Notice that link does not open in new tab.
Original comment by cow...@bbs.darktech.org
on 15 Dec 2014 at 5:03
not sure what you are trying to do,
your Selenium codes may not correct.
My guess is
you try to open Google Image page and key in "t"
Following will do the work
Actions actions = new Actions(driver);
WebElement we = driver.findElement(By.linkText("Images"));
we.click();
actions.sendKeys("t").perform();
Original comment by andrewch...@chromium.org
on 15 Dec 2014 at 7:49
Andrew,
I am trying to perform the following operation:
1. Go to google.com
2. Right click on the link "Images"
3. In the context menu, choose "open in new tab"
The code in your last comment performs a left-click on "Images" and then sends
the key "t". This isn't what I'm trying to do.
Please try performing the steps I mentioned above.
Original comment by cow...@bbs.darktech.org
on 15 Dec 2014 at 9:55
To clarify, sending "t" into the context menu (step 3) is equivalent to
choosing "open in a new tab". This is because "t" is an alias/mnemonic for that
option.
Original comment by cow...@bbs.darktech.org
on 15 Dec 2014 at 9:56
How did the ticket I logged turn into this discussion? Opening another ticket
would seem to be in order.
Original comment by bryan.go...@gmail.com
on 15 Dec 2014 at 9:57
Bryan,
Apologies. I've moved this discussion to bug #1003.
Original comment by cow...@bbs.darktech.org
on 15 Dec 2014 at 10:07
good idea to open another ticket.
Bryan, any comment on #8?
Original comment by andrewch...@chromium.org
on 15 Dec 2014 at 11:19
Thank you. Re: #8: I'm on Chrome 38 (still) and tested my code from #1 using
both chromedriver 2.10 and 2.12. Chromedriver does not select option 2 in the
heroku dropdown in either version. The alternative I offer in #2 works.
However, I would still consider this a bug. Please let me know if there is
something I'm missing in the code snippet in #1.
Again, my thanks!
Original comment by bryan.go...@gmail.com
on 15 Dec 2014 at 11:48
To me both #1 and #2 get the same result. #1 has option 2(two Down key) #2
has option 1.
use chrome 39.
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 12:33
Updating to Chrome 39 didn't work. Which version of Selenium are you using?
I'm on 2.43.1
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 1:33
I just upgraded to 2.44.0 and it still doesn't work with chromedriver. It
works just fine with firefoxdriver. Perhaps I'm missing something basic.
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 1:50
What version of chromedriver you use?
prefer chromedriver 2.12+
put aside Selenium version for now.(2.43.1 is fine)
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 6:06
I tried #1 in both chromedriver 2.10 and then 2.12, to no avail.
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 6:44
which OS you run the driver?
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 6:47
Apologies for not including previously: OS X, 10.9.5
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 6:48
you are using Mac. this could make some difference. I need get a Mac to verify
this.
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 6:56
Running Win 7 + Chrome 32 via Browserstack, #1 runs as it should. Looks like
this might be a Mac issue...
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 7:13
the base code is different.
you mainly work on Mac ?
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 7:19
Indeed I do. Perhaps I could make a contribution to the project to fix this.
Also, tried Yosemite + Chrome 38 in Browserstack, it definitely looks like a
Mac issue.
Original comment by bryan.go...@gmail.com
on 16 Dec 2014 at 7:21
good, let me know when you fix it.
Original comment by andrewch...@chromium.org
on 16 Dec 2014 at 7:28
Original comment by samu...@chromium.org
on 21 Feb 2015 at 12:19
Original comment by andrewch...@chromium.org
on 12 Mar 2015 at 5:53
Sorry I haven't had time to fix this. If anyone else can get to it, feel free.
Sorry again.
Original comment by bryan.go...@gmail.com
on 12 Mar 2015 at 5:55
Original comment by samu...@chromium.org
on 2 Apr 2015 at 9:46
Original issue reported on code.google.com by
bryan.go...@gmail.com
on 6 Oct 2014 at 3:16