How to use get an instance of a page using polymer and selenium?

147 views
Skip to first unread message

sfu...@gmail.com

unread,
Apr 23, 2015, 6:25:37 PM4/23/15
to polym...@googlegroups.com, sfu...@yahoo.fr
Hello,
Can somebody help me in finding out how to get an instance of a page using Polymer 0.5 and Selenium?
Usually we have a syntax like below. How can I have the same in Polymer?
Thanks.
# Create a new instance of the Firefox driver
driver = webdriver.Firefox()

# go to the google home page
driver.get("htow tp://www.google.com")

Peng Kim

unread,
Apr 24, 2015, 3:26:34 AM4/24/15
to polym...@googlegroups.com, sfu...@gmail.com, sfu...@yahoo.fr
I think your problem is how to use third-part plugins in shadow dom,if so ,include plugin in light dom,and make it an polymer model.
for example:
<script src="/layouts/scripts/jquery.js"></script>
<polymer-element name=“my-element">
<template>...</template>
<script>
Polymer({
this.$$ = JQuery;
})
</script>
</polymer-element>

sfu...@gmail.com

unread,
Apr 24, 2015, 11:54:03 AM4/24/15
to polym...@googlegroups.com, sfu...@gmail.com, sfu...@yahoo.fr
Thanks so much for your answer!
I don't quite understand it. What I would like to do is to run javascripts scripts that would unit test my application in Polymer, actually my components using selenium. I did download the wct-local driver from https://www.npmjs.com/package/wct-local and I am using it under web-component-tester. I see it start Selenium server and ChromeDriver but my question is actually how do I access the instance of that driver in my test as we do here below. Thanks!
# Create a new instance of the Firefox driver
driver = webdriver.Firefox()

minhh...@gmail.com

unread,
Aug 11, 2016, 5:36:22 AM8/11/16
to Polymer, sfu...@gmail.com, sfu...@yahoo.fr
Hi, 
That's right. Selenium chromedriver can not find and control element inner node shadow-root
could you please explain your instruction more clarifying
Thanks a lot
Reply all
Reply to author
Forward
0 new messages