your code looks fine but a couple of points:
to work with selenium 3.x & mozila firefox 52.x you need to download the latest gecko driver from this location and save it.
instead of "firefox.exe" you need to provide absolute path of the "geckodriver.exe"
system.setproperty("webdriver.gecko.driver","c:\\users\\12345678\\ appdata\\local\\mozilla firefox\\firefox.exe");
finally you code will look like:
system.setproperty("webdriver.gecko.driver", "c:\\seleniumutilities\\browserdrivers\\geckodriver.exe"); desiredcapabilities dc = desiredcapabilities.firefox(); firefoxprofile profile = new firefoxprofile(); dc.setcapability(firefoxdriver.profile, profile); webdriver driver = new firefoxdriver(dc); driver.manage().window().maximize(); driver.get("http:\\gmail.com");
this code executes good with me.
let me know if this helps you.
- Facing a HttpHostConnectException while using geckodriver
- Getting Error running javac.exe compiler message, while using Ant in Eclipse
- How can I stop using a mouse while programming in my IDE?
- Drop to frame feature disabled in Eclipse Debug while running testcases using JUnit
- Missing scheme (IllegalArgumentException) while using java.nio.file.Paths interface
- Downgrade Eclipse ant to compile while using older JDK libraries (Java 1.7 -> 1.6)
- Unresolved inclusion error while using NDK
- java.lang.NoSuchFieldError: PUBLIC_ONLY while using Box api in android in signed build
- How to make my project compatible with different sdk versions while using features for an specific version
- Changes wont reflect in localhost while using google app engine
- I want to customize the build process while still using the Android Eclipse ADT plug-in
- How to publish a message while receiving on a Java MQTT client using Eclipse Paho
- Facing issues while running remote java program through RSE plugin in Eclipse
- EditText in Android doesn't show text when typing while using the on-screen keyboard
- Resource leak while using try...finally?
- while using support library i am getting an error that Attribute " " has already been defined in android
- Getting java.lang.NoClassDefFoundError while using Google Gson library
- Android: Error while using bitmap to display image using android studio
- Unresolved import error with pydev while using from-import-as
- Internal error while accessing GIT repository from RSA 9.1 using TFS plug-in
- Surprise behavior of eclipse for C files while using JNI, Why so?
- Error while using ternary operator
- NetworkOnMainThreadException while using AsyncTask
- application.xml is not generated correctly while saying "Run On Server" using Weblogic (beadep)
- "The filename, directory name, or volume label syntax is incorrect." while using spark-submit
- getting IncompatibleClassChangeError while deploying EAR into WAS8.5 through Jenkins using GitHub
- Unable to Delete File while starting Browser session while using maven selenium plugin
- Error showing at onCreate() while using AppCompactActivity
- Eclipse CDT error while using Function Callgraph option of Profiling Tools
- Attempting to get aspect annotation recognized by eclipse luna while using m2e (maven) build
More Query from same tag
- Unable to create an Executable JAR on Eclipse. Couldn't find main
- Eclipse: Define multiple working sets all at once
- android webview app developed using eclipse shows XSS vulnerabilities warning
- Android not creating file
- can't commit file using subversion in eclipse
- Hadoop - Input path does not exist
- eclipse won't run my exe file
- Unable to simulate location data in Android emulator
- Check if a JTable exists and add rows to it if it does
- Problem with installing GWT 2.1 on Eclipse 3.6
- Is there a way to make Eclipse add static imports without autocomplete?
- Java object ID in jvm
- How to Load external .class file in Java?
- Hardware Accelerated BufferedImage on a laptop with two GPUs
- Eclipse editor automatically deletes and restructures lines of text
- Connecting to my own router via android
- Java remote debugging, eclipse can't stay connected
- Eclipse 32 bits running on 64 bits JVM
- JBoss Developer Studio Third Party Plugins
- Importing Eclipse project to Android Studio not working
- Why can't I boot an AVD from Eclipse with 1024 MB of RAM?
- Can't set breakpoint in eclipse
- Eclipse project for running a BAT file?
- Cannot 'Hello World' in Cocos2d-x
- Running multiple selenium testNG classes without testNG.xml file in a maven project
- Eclipse does not open my workspace
- Making android app work with a python web server
- AWS toolkit install error
- In Eclipse, can I choose the version of Scala for my project?
- developing custom android plugins using Cordova 6 and greater in eclipse ide