Unable to import Android Web Driver library using Selenium - selenium-webdriver

I have been trying to use the android web driver but the eclipse IDE can't find the class definitions for the following set of imports
import org.openqa.selenium.android;
import org.openqa.selenium.android;
i have already followed the procedure as specified in the following link
https://code.google.com/p/selenium/wiki/AndroidDriver
but still i cant import these two classes
so anyone with some suggestions please help me out, thanks in advance

Use
import org.openqa.selenium.android.*;
The classes are within package org.openqa.selenium.android

Related

React Native - Storybook Adding Addons

I am using a boilerplate Ignite Bowser and I am trying to add Knob Addon to storybook, but so far I cant make it to work.
On the story, I added a decorator like the following code:
storiesOf("Button", module)
.addDecorator(fn => {fn()})
.addDecorator(withKnobs)
However, when trying to add: "#storybook/addon-knobs/register" Im failing at it.
Some help would be nice.
Thanks
Project Overview
When running on React Native you need to install knobs from the on-device
Create a file named ./rn-addons.ts
Add the following import on the file:
import '#storybook/addon-ondevice-knobs/register'
Then in your file storybook.ts, you import that rn-addons:
import './rn-addons'

How to teach WebStorm to recognize dynamic import statement?

When I'm trying to use dynamic import statement in WebStorm I receive a syntax error:
How to solve a problem?
P.S. JSX mode is on, everything is okey. I feel it's expecting a static import statement like import Login from '...', but I need dynamic - import(...)
This bug is fixed in 2017.3, please try the EAP

Annotation issue: #PrepareForTest cannot be resolved to a type

I am quite new to Selenium Webdriver with cucumber and is facing an issue while running the Junit test. I tried searching for the resolution to this issue on different forums but didn't get anything helpful, probably since I am new to this.
Below is the code where the problem is. All and any help is appreciated.
package firstCucumber;
import org.junit.runner.*;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.*;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.*;
import org.junit.Test;
#RunWith(Cucumber.class)
#PrepareForTest(TestRunner.class)
#CucumberOptions(
features = "Feature",
glue = {"stepDefiition"}
)
public class TestRunner {
}
It says #PrepareForTest cannot be resolved to a type at the line where # PrepareForTest is written
Add powermock-core-1.6.5.jar to the build path. I faced similar issue and it got resolved once after adding this jar

Importing modules in TypeScript

I`m working with the tutorial http://www.codeproject.com/Tips/1026938/AngularJS-Getting-Started-with-Visual-Studio
and get the problem this line:
import {Component, View, bootstrap, NgFor} from "angular2/angular2";
and I got the problem in this line:
TS2307 Cannot find module 'angular2/angular2'
I have exactly same files and folders, as in tutorial.
I try "typings/angular2/angular2", but this also didn`t help.
See the step-4 in your-tutorial-link. These settings are required for visual studio to detect the module.

pycrypto develoment server error "from Crypto.Cipher import blockalgo"

I have installed pycrypto version 2.6 , and i am getting this error
from Crypto.Cipher import blockalgo
ImportError: cannot import name blockalgo
I have read many post but i am unable to solve this problem
If you are not able to import anything from Crypto.Cipher at all, it might be due to folders, crypto and respective egg info, under site-packages are created with lower-case 'c'
/Library/Python/2.7/site-packages/crypto
/Library/Python/2.7/site-packages/crypto-1.0.0-py2.7.egg-info
Imports were successful when same case was used while importing
from crypto.Cipher import AES
or renaming the folders
/Library/Python/2.7/site-packages/Crypto-1.0.0-py2.7.egg-info
/Library/Python/2.7/site-packages/Crypto
I went with the later, to have consistency with others.
I use Eclipse and was able to overcome this problem using one of the above solutions.
Sometimes we overlook these kind of details easily. Its a long shot, hope this helps!

Resources