Not able to click on any button in the application.
Error stack trace:
org.openqa.selenium.ElementNotVisibleException: element not interactable
(Session info: chrome=73.0.3683.103)
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:03:16.397Z'
System info: host: 'SHIPAWAR-54Q9D', ip: '10.65.75.122', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver
I tried java script executor, actions class but none of them worked
public void clickHERE(String deal) throws Throwable{
javaScriptClick(driver, HERE);
driver.findElement(By.xpath(enterDeal)).sendKeys(deal);
Thread.sleep(5000);
int ok_size=driver.findElements(By.cssSelector("[name=SearchDeal]")).size();
System.out.println("the search button size:" +ok_size);
driver.findElement(By.xpath(enterDeal)).sendKeys(Keys.ENTER);
Thread.sleep(5000);
scrollToElement(driver, nextTabDealInfo);
driver.findElement(By.xpath(nextTabDealInfo)).click(); // this button in not working
}
should be able to click the button.
nextTabDealInfo is the xpath:
//*[#type='button' and contains(#value,'Next Tab')]
HTML for button:
<input type="button" name="fromOptyInfoTab" value="Next Tab >" onclick="return switchTabs('nonStandardInfo.do');" class="buttonNextTab">
This error message...
org.openqa.selenium.ElementNotVisibleException: element not interactable
.
System info: host: 'SHIPAWAR-54Q9D', ip: '10.65.75.122', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
...implies that the ChromeDriver was unable to communicate with the Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Your Selenium Client version is 3.10.0 of 2018-03-02T19:03:16.397Z which is almost an year older.
Your JDK version is 1.8.0_60 which is pretty old and ancient.
So there is a clear mismatch between the JDK v8u60 , Selenium Client v3.10.0
Solution
Upgrade JDK to recent levels JDK 8u202.
Upgrade Selenium to current levels Version 3.141.59.
Related
I've been using selenium with chrome and I've been trying to access a website but I keep receiving this error message:
Access Denied You don't have permission to access "website" on this server.
The website works fine on my regular chrome browser, but when opened through selenium I receive this error message.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'CHL130688', ip: '10.100.40.93', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
chrome driver 77
chrome version 77
Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865#{#442}) on port 38929
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created
from disconnected: unable to send message to renderer
(Session info: chrome=77.0.3865.90)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DESKTOP-JCFLT7B', ip: '192.168.1.113', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.2'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Versions of driver and of Chrome should match.
In Chrome, disable autoupdates. Otherwise after launching Chrome will be updated and can became incompatible with Java driver.
Below code I written to open www.google.com under selenium standalone Grid environment. During the execution it shows error
CONFIGURATION:
OS: WINDOWS 10
BROWSER : FireFox (66.0.3)
Selenium Standalone Command:
java -Dwebdriver.gecko.driver=C:\eClipse\jar\Selenium\geckodriver\geckodriver.exe -jar selenium-server-standalone-3.141.59.jar -role standalone
ERROR:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'QAT2', ip: '10.1.6.79', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: unknown
I try to google this exception but not find any clue to solve it. Can I have any solution for this.
CODE:
public class GridSetup {
private String baseUrl ;
private String nodeURL ;
public WebDriver wDriver ;
public static void main() throws MalformedURLException{
baseUrl = "http://www.google.com";
nodeURL = "http://localhost:4444/wd/hub";
System.setProperty("webdriver.gecko.driver","C:\\eClipse \\geckodriver.exe");
DesiredCapabilities caps = DesiredCapabilities.firefox();
System.out.println( "#####################");
caps.setBrowserName("firefox");
caps.setCapability("marioneete", true);
caps.setPlatform(Platform.WIN10);
caps.setVersion("66.0.3");
wDriver = new RemoteWebDriver(new URL(nodeURL), caps);
wDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
wDriver.get(baseUrl);
}
}
This error message...
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'QAT2', ip: '10.1.6.79', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: unknown
...implies that the GeckoDriver was unable to initiate/spawn a new WebBrowsing Session i.e. Firefox Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Your Selenium Client version is 3.141.59.
Your JDK version is 1.8.0_91 which is pretty ancient.
So there is a clear mismatch between the JDK v8u91 , Selenium Client v3.141.59.
Solution
Upgrade JDK to recent levels JDK 8u202.
could anyone please tell me , why i get timeout out issue intermittently while sign in on web page after browsing the URL . i get it intermittently , it works fine after i close all the web browser and run the program . the below error message , i want to know the root cause , can anyone help me please !
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
This error message...
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.42
Release Notes of chromedriver=2.42 clearly mentions the following :
Supports Chrome v68-70
You are using chrome=71.0
Release Notes of ChromeDriver v2.45 clearly mentions the following :
Supports Chrome v70-72
So there is a clear mismatch between the ChromeDriver v2.42 and the Chrome Browser v71.0
Solution
Upgrade ChromeDriver to current ChromeDriver v2.45 level.
Keep Chrome version between Chrome v70-72 levels. (as per ChromeDriver v2.45 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test.
I am using selenium 2.53.1 and Mozilla 37.0. While executing script throws exception as below:
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, browserName=Firefox, moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}, version=, platform=ANY}], required capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}]
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'JAYANT-PC', ip: '192.168.132.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
How can avoid this Error?
Your gecko driver and selenium versions are possibly mismatched. Please refer to this github thread: https://github.com/SeleniumHQ/selenium/issues/3630
update your firefox and use selenium 3.3.1 and geckodriver 0.15.0,it will work