Overview
·I tried to operate the electron app from selenium, but the click operation does not work.·There are cases where the click operation is different from the specified location.
·If you use the electron app yourself, it works fine.
Does anyone know what's going on?
environment
·MacBook Pro/OS X Yosemite (10.10.4)
·Electron
·v0.33.1
·v0.36.1
·ChromeDriver
·chromedriver-v2.15-darwin-x64
·chromedriver_mac32_2_20
·jQuery
·1.11.3
Details
First of all, I have made the following HTML into an Electron app.
<html>
<head>
...
<script>
window.jQuery=window.$=require("jquery");
$(function(){
$("#link1").click(function(){
$("#status1").text("OK");
});
$("#link2").click(function(){
$("#status2").text("OK");
});
$("#link3").click(function(){
$("#status3").text("OK");
});
});
</script>
</head>
<body>
<span id="status1">/span><a href="#1" id="link1" class="link">link1</a>br>
<span id="status2">/span><a href="#2" id="link2" class="link">link2</a>br>
<span id="status3">/span><a href="#3" id="link3" class="link">link3</a>br>
</body>
</html>
"When I started the app and pressed each link, ""OK"" appeared in front of the link, and I confirmed that it was working as expected."
Next, I wrote the following ruby code (excerpt) in Selenium.
...
link1 = driver.find_element(:id, 'link1')
link1.click
sleep(5)
link2 = driver.find_element(:id, 'link2')
link2.click
sleep(5)
link3 = driver.find_element(:id, 'link3')
link3.click
...
If you do this, link1, link2 will be fine, but only link3 will not show "OK".
Does anyone know what's going on?
html, if you add a similar link4 to the code, an app-side link4 event will occur during the selenium link3.click operation. (???)
Thank you for your cooperation.
electron selenium-webdriver
This didn't happen in my environment, and I could only make it work as expected with Electron.
Other than Electron and WebDriver, for example, you may want to follow:
Electron and ChromeDriver both worked in the following combinations:
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
581 PHP ssh2_scp_send fails to send files as intended
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.