System.setProperty("webdriver.gecko.driver", "/home/geckodriver");
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
String Hub = "http://IP:5555/wd/hub"; // IP is my local Ip
driver = new RemoteWebDriver(new URL(Hub),capabilities);
driver.manage().window().maximize();
driver.navigate().to(myURL);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
WebElement myElement = driver.findElement(By.id("buttonProductSearch"));
myElement.click();
I don’t think that’s possible.
RemoteWebDriver or Selenium for that matter has got nothing to do with resetting a variable back to null (As you claim) because that’s Java and not Selenium.
Can you please share a full fledged example that can be executed to recreate this problem ?
When I say a full fledged example, I am referring to either a @Test (TestNG/Junit) annotated test method (or) a public static void main() method that can be executed by anyone in this forum to reproduce the problem ?
Selenium WebDriver implementation will either throw an exception (if an element cannot be found) or will find an element and return back a proper WebElement representation when driver.findElement() is invoked.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/682cef7b-d440-4654-b9f4-23090486dc73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I tried executing your code (via IntelliJ) and I am not able to reproduce your issue.
How are you running your test ?
On an unrelated note, I am seeing that you have mixed both TestNG and Junit annotations (not that it has anything to do with the problem but am just stating this).
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
From: <seleniu...@googlegroups.com> on behalf of <m.emin...@gmail.com>
Reply-To: <seleniu...@googlegroups.com>
Date: Wednesday, May 24, 2017 at 1:05 PM
To: Selenium Users <seleniu...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/60106696-6035-4418-b2b4-fc609b195335%40googlegroups.com.