Hi,I've just started using Coypu and seems to have very useful features. There are a few things (beginner type questions) if you could help me with?1. In most of my testing, I have to check for some text and click a button. But the ID and button text is different/unknown.
But the button will be in the same <tr> or <div>. How do I find this button?Logically it would seem like, find the first sibling of the text element node that is a button
2. How can I find links that contains a sub string in its text?For instance, find the link if the text contains "encyclopedia".<a href="http://en.wikipedia.org/wiki/Compress"><em>compress</em> - Wikipedia, the free encyclopedia</a>
3. Does Coypu have a wiki?
-Skip--
You received this message because you are subscribed to the Google Groups "Coypu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coypu+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi, how to create pull request?
I tried but not figured out how to do that!
driver.FillIn("Selector").With("Ca");
if (driver.HasContent("Car", new Options { Timeout = TimeSpan.FromSeconds(10) }))
{
var e = driver.FindId("Selector");
e.SendKeys(Keys.ArrowDown);
e.SendKeys(Keys.Enter);
}
var selenium= ((OpenQA.Selenium.Remote.RemoteWebDriver) browserSession.Native);selenium.Manage().Window.Maximize(); browserSession?browser = browserSession();browser.Visit("https://gmail.com")
is it correct?
This code is incorrect!
browser.Select("part 1").From("//*[@id='ctl00_Form_deptDropDown']");
or can just use ID and NAME?
Hi, How to use Coypu with Drop Down?
how can I use xpath or css in from field?browser.Select("part 1").From("//*[@id='ctl00_Form_deptDropDown']");
You just need:
browser.FindXPath("//*[@id='ctl00_Form_deptDropDown']").Select("part 1");
Hi, I tried to use XPath for DropDown but it does not work, It looks like Coypu skipped row
see my code below:
skipped, does not work at all
browser.FindXPath("//*[@id='ctl00_PageContent_contactForm_deptDropDown']").Select(department);
Work as expected:
browser.Select(department).From("ctl00_PageContent_contactForm_deptDropDown");
<select id="ctl00_PageContent_contactForm_deptDropDown" class="body" name="ctl00$PageContent$contactForm$deptDropDown">
<option value="" selected="selected"/>
<option value="value1">value1</option>
<option value="value2">value2</option>
</select>
var pool = browser.FindAllXPath("//*[@id='ui-id-2']//a", new Options { Timeout = TimeSpan.FromSeconds(10) }).ToList(); pool[0].Click();
How to call method FindAllXPath with timeout?
Something like this one.
The code is incorrect.var pool = browser.FindAllXPath("//*[@id='ui-id-2']//a", new Options { Timeout = TimeSpan.FromSeconds(10) }).ToList(); pool[0].Click();
You just need:browser.FindXPath("//*[@id='ctl00_Form_deptDropDown']").Select("part 1");in that particular case you should just use ID anyway of course, but yes, you can use any Find method and call .Select(...) on the element returned.
browser.FindAllXPath("//*[@id='ui-id-2']//a", (elements) => elements.Count() >= 3))[0].Click();
thank you very much
but your implementation does not work at all, did you test it on any HTML?
approach 1You just need:browser.FindXPath("//*[@id='ctl00_Form_deptDropDown']").Select("part 1");in that particular case you should just use ID anyway of course, but yes, you can use any Find method and call .Select(...) on the element returned.
approach 2browser.FindAllXPath("//*[@id='ui-id-2']//a", (elements) => elements.Count() >= 3))[0].Click();
thanks
can you check your approaches?
<div id="My_TypeSelector_Selector" class="My_Selector">
<input type="checkbox" /> Soccer <br />
<input type="checkbox"/> Football - Russia<br />
<input type="checkbox"/> Baseball<br />
<input type="checkbox"/> Football - Germany <br />
<input type="checkbox" /> Basketball <br/>
</div>
How to perform double-click using coypu?
Or I should dive into the native driver and then use double click as usual?
var driver = ((OpenQA.Selenium.Remote.RemoteWebDriver)browser.Native); Actions action = new Actions(driver); action.DoubleClick(IWebElement); action.Perform();Thanks.
How can I dive into the native element IWebElement from SnapshotElementScope and use it with native driver?
I want to use it in code below:var driver = ((OpenQA.Selenium.Remote.RemoteWebDriver)browser.Native); Actions action = new Actions(driver); action.DoubleClick(IWebElement); action.Perform();
Thanks.
воскресенье, 24 февраля 2013 г., 9:49:04 UTC+2 пользователь skip...@gmail.com написал:Hi,I've just started using Coypu and seems to have very useful features. There are a few things (beginner type questions) if you could help me with?1. In most of my testing, I have to check for some text and click a button. But the ID and button text is different/unknown.But the button will be in the same <tr> or <div>. How do I find this button?Logically it would seem like, find the first sibling of the text element node that is a button.2. How can I find links that contains a sub string in its text?For instance, find the link if the text contains "encyclopedia".<a href="http://en.wikipedia.org/wiki/Compress"><em>compress</em> - Wikipedia, the free encyclopedia</a>3. Does Coypu have a wiki?-Skip
var lis = browser.FindAllXPath("//div[@class='select2-result-label']", elements => elements.Count() >= 1).ToList();
lis[0].Click();lis[0].Click();// Double click does dot work
action.DoubleClick(IWebElement);I don't known how to cast to Native
I just have situation like this:var lis = browser.FindAllXPath("//div[@class='select2-result-label']", elements => elements.Count() >= 1).ToList();lis[0].Click();lis[0].Click();// Double click does dot work
How to cast to Native from lis[0] and use it in code belowaction.DoubleClick(IWebElement);