selenium-server

How can I overcome Element id exception in Selenium?

和自甴很熟 提交于 2019-12-04 14:50:42
T set 'id' for GWT widgets in UiBinder itself. For eg. Also added in *.gwt.xml Then I try this in Selenium test case WebElement element = driver.findElement(By.id("gwt-debug-loginButton")); Sometimes it works correctly. But some times it throws the following exception, Unable to locate element: {"method":"id","selector":"gwt-debug-loginButton"} Command duration or timeout: 62 milliseconds What i need to update? Can anyone help me? Use WebDriverWait, to search for element after a certain period of time. Something like this. try { (new WebDriverWait(driver, seconds, delay)).until(new

java.lang.UnsupportedClassVersionError: org/openqa/gr id/selenium/GridLauncher (Unsupported major.minor version 50.0)

这一生的挚爱 提交于 2019-12-04 02:26:29
I got this selenium server jar file in my Selenium folder. When I'm trying to execute this with java - jar selenium-server-standalone-2.0b3.jar command I'm getting this version difference error. Can anyone please show me where I'm making a mistake? Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openqa/gr id/selenium/GridLauncher (Unsupported major.minor version 50.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader

Remote File Upload Protractor test

谁说胖子不能爱 提交于 2019-11-29 04:39:32
I am writing tests in protractor which a JS based framework and selenium test stack for running tests. I am facing an issue where I have to test file upload. Problem I am having is File I am trying to upload is in the test package whereas selenium node is a separate server so it will not get the file. I tried using file descriptor although the file name is set contents don’t get uploaded. Below is the code snippet that I have. var remote = require('selenium-webdriver/remote'); browser.setFileDetector(new remote.FileDetector()); var absolutePath = path.resolve(__dirname, "../specs/data