Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Max Harris
@maxharris9
hmm, ok
Max Harris
@maxharris9
whelp, that looks like it works perfectly
Gerry Hernandez
@gerryhernandez
Awesome!
Yea so WebDriver doesn't really take into account DOM manipulation. So ever since UI libraries/frameworks like KnockOut, Angular, React, and others, stale elements have become an epidemic. The short term fix, generally, is to wrap some logic around elements so that they lazy-load and refresh themselves when stale.
I guess super short term fix, while nasty and not recommended long term, is to sleep between expected manipulations.
And re-query the elements...
Nick Tulett
@NickTulett
Yes the dreaded staleness. Our "waitFor" method is currently 100 lines long and still doesn't catch everything. Only today I was wrestling with an Angular table that refused to exist when I waited for the "table" element and would only work if I waited for "tbody tr td" first. Mind boggling.
Max Harris
@maxharris9
part of my motivation has been to get some tests in place so that I can migrate an app to redux
so I’ve been working on implementing a “pause” feature in the existing data layer to fix this problem
Gerry Hernandez
@gerryhernandez
I wrote my own WebDriver binding that solves these problems, but my employer owns it. I'm trying to open source it.
It's strongly influenced by this module. We started with this module, actually.
But basically, all the magic happens inside of the JVM, rather than in Node. Way more control inside of the JVM.
Max Harris
@maxharris9
wow.
that sounds amazing, and I hope they let you do it! (I know exactly how that can be)
Gerry Hernandez
@gerryhernandez
Yea. If we can do it, I'd love to get Joseph and Nick in on it. They're doing great with this project.
Nick Tulett
@NickTulett
You could be brave and monkey-patch things like getText(), isDisplayed() etc as long as you are convinced that staleness should imply non-existence:
element.isDisplayed = function isDisplayed() { try { return element._instance.isDisplayed(); } catch (e) { return false; } };
Nick Tulett
@NickTulett
yikes, that should probably be
element.isDisplayed = function isDisplayed() { try { return element._instance.isDisplayedSync(); } catch (e) { return false; } };
Jim Kynde Meyer
@jimkyndemeyer
Hey. On OSX El Capitan I get the following message when using webdriver-sync ChromeDriver: "You need to install th elegacy Java SE 6 Runtime". The Java API works fine from Java 8, so wondering if there's a way to avoid installing Java SE 6?
Gerry Hernandez
@gerryhernandez
I installed Oracle JDK 8 and have no issues.
But I haven't tried with just the JRE.
Sai Ram Kunala
@sairam
hi
i have some trouble installing webdriver-sync on mac os x 10.12
Gerry Hernandez
@gerryhernandez
Can you describe the issue?
Manuel Sanchez
@Pichoncoder
Hi team, I am trying to use sizzle on top of webdriver-sync any thoughts ?
query elements with sizzle is very smooth and clean, If you can give me some input would be appreciate
thanks
leiyanggz
@leiyanggz

Hi team. When I used phantom driver I got this error

Error: Error creating class
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.find(Ljava/lang/String;)Ljava/lang/String;

This is a common selenium-server-standalone-3.1 bug, I manually included the 'selenium-server-standalone-3.2.0.jar'

// node_mudules/selenium-binaries/binary-paths.json
{
  "home": "/Users/xxx/.selenium-binaries",
  "seleniumserver": "/Users/xxx/.selenium-binaries/selenium/3.2.0/selenium-server-standalone-3.2.0.jar",
  "chromedriver": "/Users/xxx/.selenium-binaries/chromedriver/2.27/chromedriver",
  "geckodriver": "/Users/xxx/.selenium-binaries/geckodriver/0.14.0/geckodriver"
}

then the phantom driver works as expected.
Please change the dependency to selenium-server-standalone-3.2, thanks.

Manuel Sanchez
@Pichoncoder
after updating the json package, I did not have any issue. was outdated
Revedko
@Revedko1_twitter
Hello guys
I just start using webdriver-sync and wandered how I can start chrome with flags, for example --incognito using this library
Revedko
@Revedko1_twitter
Oh I just scroll up and found solution. Thanks
Anubhav Chaturvedi
@anubhavchaturvedi
Hi, I was just trying out webdriver-sync module but facing an error in instantiating the firefox driver itself
I get Error: Error creating class
when running var driver = new FirefoxDriver();
Anyone faced this issue ?
Mikhail Kalashnikov
@mikkqu
Is it possible to compare two elements to find out if they are the same?
I thought of 'el1.getId === el2.getId' but webdriver-sync doesn't seem to have one
Micael Gallego
@micaelgallego
Hi guys
how can I create a remote webdriver with webdriver-sync?
I've tested with the following code:
var driver = new wd.RemoteWebDriver()
.forBrowser('chrome')
.usingServer('http://172.18.0.13:8040/eus/v1/')
.build();
This code is the official sample for remote webdriver.
Micael Gallego
@micaelgallego
The code I've used is:
var driver = new webdriver.Builder()
.forBrowser('firefox')
.usingServer('http://localhost:4444/wd/hub')
.build();
Mario Mixtega Pacheco
@mariomixtegapach
Hello there!
When I'm installing it fails
Im using this --msvs_version=2013
And it looks like doesn't have support for msvs 2017
Would I install VS 2010 just for this library?
Nick Tulett
@NickTulett
It's been very quiet lately but just letting you know I pushed v1.0.1 to npm at the end of the week. It's just a refresh of all the underlying driver binary versions, some dependency updates and build tests against node.js 8, 10 and 11 and jdk 8 and 11.