Skip to content

Instantly share code, notes, and snippets.

@jimevans
jimevans / help
Last active January 31, 2019 20:04 — forked from kyk4322/help
DataTable dt = new DataTable();
var header = driver.FindElement(By.CssSelector("#gridComponent > div.k-grid-header"));
foreach (var row in header.FindElements(By.TagName("tr")))
{
//Configure Number of Col and row
int cellIndex = 0;
string[] arr = new string[32];
//Get Cell Data
@jimevans
jimevans / html
Last active January 31, 2019 19:57
<table role="grid">
<colgroup>
<col style="width:60px">
<col style="width:80px">
<col style="width:130px;">
<col style="width:300px;">
<col>
<col>
<col style="width:200px;">
<col style="width:180px">
DataTable dt = new DataTable();
//Adding Number of Col of Data Output
string Header = driver.FindElement(By.CssSelector("#gridComponent > div.k-grid-header > div > table > thead > tr")).Text;
// Get rows strings
foreach (string row in Header.Split('\r'))
{
DataRow dataRow = dt.NewRow();
}
@jimevans
jimevans / ie.cs
Last active April 10, 2018 21:49 — forked from perrygoy/ie.cs
IE driver instantiation C#
_currentWebDriver = new InternetExplorerDriver(new InternetExplorerOptions()
{ IgnoreZoomLevel = true, InitialBrowserUrl = SeleniumBaseUrl, RequireWindowFocus = true })
{ Url = SeleniumBaseUrl };
@jimevans
jimevans / stack.txt
Created August 23, 2017 16:22 — forked from anonymous/stack.txt
iOS platform doesn't exist
org.openqa.selenium.WebDriverException: Unrecognized platform: iOS Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-17T15:26:08.955Z' System info: host: 'mdoerksen-ltm', ip: '192.168.1.225', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_131' Driver info: driver.version: unknown at org.openqa.selenium.Platform.fromString(Platform.java:300) at org.openqa.selenium.Capabilities.getPlatf
namespace Tests
{
[TestClass]
public class uhtest : TestBase
{
[TestMethod]
public void TestMethod1()
{
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MaterialFlow.Pages;
using MaterialFlow.Utilities;
namespace Tests
{
[TestClass]
public class CanPlaceOrderSuccesfullyFromHomeCategories : TestBase
{
public class SomePage extends CommonPage {
@FindBy(id = "anId")
private WebElement el;
public SomePage(WebDriver driver) {
super(driver);
}
public OtherPage goOtherPage() {
@jimevans
jimevans / gist:8308969
Last active January 2, 2016 13:19 — forked from jleyba/gist:8307735
bot.inject.recompileFunction_ = function(fn, theWindow) {
if (goog.isString(fn)) {
try {
return new theWindow['Function'](fn);
} catch (ex) {
// Try to recover if in IE-quirks.
// Need to initialize the script engine in the passed-in window.
if (goog.userAgent.IE && theWindow.execScript) {
theWindow.execScript(';');
return new theWindow['Function'](fn);
/*
error that i got:
java.lang.NullPointerException
at com.mycompany.PageGeneric.login(PageGeneric.java:36)
at com.mycompany.DemoPageFactory.loginTest(DemoPageFactory.java:41)
*/
//this is my page class
public class PageGeneric {
private WebDriver driver;