@@ -37,15 +37,15 @@ ptor.get('http://localhost:8000/app/index.html');
3737
3838// Could still use driver.get to get a URL normally, without injecting modules.
3939
40- ptor . findElement ( webdriver . By . css ( '[app-version]' ) ) . getText ( ) . then ( function ( text ) {
40+ ptor . findElement ( protractor . By . css ( '[app-version]' ) ) . getText ( ) . then ( function ( text ) {
4141 assert . equal ( '3' , text ) ;
4242} ) ;
4343
44- var sample1Button = driver . findElement ( webdriver . By . id ( 'sample1' ) ) ;
45- var sample2Button = driver . findElement ( webdriver . By . id ( 'sample2' ) ) ;
44+ var sample1Button = driver . findElement ( protractor . By . id ( 'sample1' ) ) ;
45+ var sample2Button = driver . findElement ( protractor . By . id ( 'sample2' ) ) ;
4646sample1Button . click ( ) ;
4747
48- var fetchButton = driver . findElement ( webdriver . By . id ( 'fetch' ) ) ;
48+ var fetchButton = driver . findElement ( protractor . By . id ( 'fetch' ) ) ;
4949fetchButton . click ( ) ;
5050
5151// The quick RPC works fine.
@@ -61,10 +61,10 @@ ptor.findElement(protractor.By.binding(), "{{data}}").getText().then(function(te
6161sample2Button . click ( ) ;
6262fetchButton . click ( ) ;
6363// Would normally need driver.sleep(2) or something.
64- ptor . findElement ( webdriver . By . id ( 'statuscode' ) ) . getText ( ) . then ( function ( text ) {
64+ ptor . findElement ( protractor . By . id ( 'statuscode' ) ) . getText ( ) . then ( function ( text ) {
6565 assert . equal ( '200' , text ) ;
6666} ) ;
67- ptor . findElement ( webdriver . By . id ( 'data' ) ) . getText ( ) . then ( function ( text ) {
67+ ptor . findElement ( protractor . By . id ( 'data' ) ) . getText ( ) . then ( function ( text ) {
6868 assert . equal ( 'finally done' , text ) ;
6969} ) ;
7070
@@ -73,7 +73,7 @@ var urlBox = ptor.findElement(protractor.By.input('url'));
7373urlBox . clear ( ) ;
7474urlBox . sendKeys ( '/3seccall' ) ;
7575fetchButton . click ( ) ;
76- ptor . findElement ( webdriver . By . id ( 'data' ) ) . getText ( ) . then ( function ( text ) {
76+ ptor . findElement ( protractor . By . id ( 'data' ) ) . getText ( ) . then ( function ( text ) {
7777 assert . equal ( 'done after 3 seconds' , text ) ;
7878} ) ;
7979
@@ -86,12 +86,12 @@ ptor.addMockModule('moduleA', mockModuleA);
8686ptor . get ( 'http://localhost:8000/app/index.html#/bindings' ) ;
8787
8888// Now, version should be 2, since only moduleA has been loaded.
89- ptor . findElement ( webdriver . By . css ( '[app-version]' ) ) . getText ( ) . then ( function ( text ) {
89+ ptor . findElement ( protractor . By . css ( '[app-version]' ) ) . getText ( ) . then ( function ( text ) {
9090 assert . equal ( '2' , text ) ;
9191} ) ;
9292
9393ptor . findElement ( protractor . By . select ( 'planet' ) ) .
94- findElements ( webdriver . By . tagName ( "option" ) ) . then ( function ( planetOptions ) {
94+ findElements ( protractor . By . tagName ( "option" ) ) . then ( function ( planetOptions ) {
9595 for ( var i = 0 ; i < planetOptions . length ; ++ i ) {
9696 planetOptions [ i ] . getText ( ) . then ( function ( text ) {
9797 util . puts ( text ) ;
0 commit comments