Python - text is flipped using camelot to extract table from PDF - python-camelot

I'm using library camelot to read PDF and extract tables.
For most PDF it works perfectly.
But for other PDF, the text is flipped.
Does anyone know what causes it and how to fix it?
Here's the link to the PDF:https://drive.google.com/file/d/1Br34gJlx_7VUBmTYCTKXy1502qls44i7/view?usp=sharing
NOTE: the PDF is in hebrew, which in-a-way should be flipped, but it happens ONLY for this kind of PDF,
Also note that English and number got flipped as well
e.g. HSITIRB should be BRITISH
[
[
{
"0": "",
"1": "",
"2": "20/21/0202",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": ""
},
{
"0": "",
"1": "",
"2": "",
"3": "20/10/1202",
"4": "",
"5": "",
"6": "",
"7": "",
"8": ""
},
{
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "20/21/0202",
"8": ""
},
{
"0": "םוכס",
"1": "ךיראת",
"2": "",
"3": "םוכס",
"4": "סיטרכ",
"5": "טוריפ",
"6": "ףנע",
"7": "קסעה תיב םש",
"8": "ךיראת"
},
{
"0": "בויח",
"1": "בויח",
"2": "",
"3": "הקסעה",
"4": "גצוה",
"5": "",
"6": "",
"7": "",
"8": "הקסעה"
},
{
"0": "08.269",
"1": "50/11/02",
"2": "",
"3": "26.373",
"4": "אל",
"5": "-ב . תירבה תוצרא יוכיז",
"6": "תוריית",
"7": "6211390024521 A HSITIRB",
"8": "13/01/0202"
},
{
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "2/11/02",
"6": "",
"7": "",
"8": ""
},
{
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "3.0004",
"6": "",
"7": "",
"8": ""
},
{
"0": "08.269",
"1": "",
"2": "20/11/05",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": ""
},
{
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "20/21/0202",
"8": ""
},
{
"0": "םוכס",
"1": "",
"2": "םוכס",
"3": "סיטרכ",
"4": "",
"5": "טוריפ",
"6": "ףנע",
"7": "קסעה תיב םש",
"8": "ךיראת"
},
{
"0": "בויח",
"1": "",
"2": "הקסעה",
"3": "גצוה",
"4": "",
"5": "",
"6": "",
"7": "",
"8": "הקסעה"
},
{
"0": "00.66",
"1": "",
"2": "00.66",
"3": "אל",
"4": "",
"5": "",
"6": "םיסנניפ",
"7": "םימולשת תייצקילפא ייפ",
"8": "50/11/0202"
},
{
"0": "00.10",
"1": "",
"2": "00.10",
"3": "אל",
"4": "",
"5": "",
"6": "דרשמו דויצ",
"7": "טנרטניא קווש יקצמיטס",
"8": "90/11/0202"
},
{
"0": "00.50",
"1": "",
"2": "00.50",
"3": "אל",
"4": "",
"5": "",
"6": "םיסנניפ",
"7": "פ\"הנב TIB ב הרבעה",
"8": "11/11/0202"
},
{
"0": "00.362",
"1": "",
"2": "00.362",
"3": "אל",
"4": "",
"5": "",
"6": "םיסנניפ",
"7": "פ\"הנב TIB ב הרבעה",
"8": "51/11/0202"
},
{
"0": "00.170",
"1": "",
"2": "00.170",
"3": "אל",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "ובטימב ינגרוא - עבט תרומש",
"8": "61/11/0202"
},
{
"0": "60.130",
"1": "",
"2": "60.130",
"3": "",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "הרדח ףוננחוי",
"8": "61/11/0202"
},
{
"0": "48.99",
"1": "",
"2": "48.99",
"3": "",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "הרדח ףוננחוי",
"8": "61/11/0202"
},
{
"0": "00.99",
"1": "",
"2": "00.99",
"3": "אל",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "מ\"עב 'גייסרשטיינ ייפוי",
"8": "12/11/0202"
},
{
"0": "29.233",
"1": "",
"2": "29.233",
"3": "אל",
"4": "",
"5": "דנלוה",
"6": "ןוזמ",
"7": "BREHI",
"8": "22/11/0202"
},
{
"0": "00.119",
"1": "",
"2": "00.119",
"3": "",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "עבטו ןילבת",
"8": "32/11/0202"
},
{
"0": "93.268",
"1": "",
"2": "93.268",
"3": "",
"4": "",
"5": "",
"6": "קלד",
"7": "ןורשה תלצבח ןולא רוד",
"8": "32/11/0202"
},
{
"0": "31.248",
"1": "",
"2": "31.248",
"3": "",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "הרדח - יול ימר",
"8": "42/11/0202"
},
{
"0": "90.129",
"1": "",
"2": "90.129",
"3": "",
"4": "",
"5": "",
"6": "ןוזמ",
"7": "הרדח ףוחה לומ םראפ-רפוס",
"8": "52/11/0202"
},
{
"0": "60.99",
"1": "",
"2": "60.99",
"3": "",
"4": "",
"5": "",
"6": "דוגיב",
"7": "ףוח לומ הרדח",
"8": "52/11/0202"
},
{
"0": "80.56",
"1": "",
"2": "80.56",
"3": "אל",
"4": "",
"5": "עבק תארוה",
"6": "תוריית",
"7": "תישדוח תינובשח וגנפ",
"8": "72/11/0202"
},
{
"0": "91.142",
"1": "20/12/02",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": ""
}
],
[
{
"0": "",
"1": "",
"2": ">> תוקסעה לע ףסונ טוריפל",
"3": "",
"4": ""
},
{
"0": "",
"1": "",
"2": "",
"3": "",
"4": "סיטרכל יארשא תויביר"
},
{
"0": "דע",
"1": "ךיראתמ",
"2": "תיביר",
"3": "רועיש",
"4": "תוליעפ גוס"
},
{
"0": "ךיראת",
"1": "",
"2": "תיתנש",
"3": "תיביר",
"4": ""
},
{
"0": "",
"1": "",
"2": "תמאותמ",
"3": "תילנימונ",
"4": ""
},
{
"0": "",
"1": "01/40/02",
"2": "11.12",
"3": "60.11",
"4": "03+"
},
{
"0": "",
"1": "",
"2": "",
"3": "00.10",
"4": ""
},
{
"0": "",
"1": "01/40/02",
"2": "35.13",
"3": "60.12",
"4": "טידרק"
},
{
"0": "",
"1": "",
"2": "",
"3": "00.11",
"4": ""
},
{
"0": "",
"1": "",
"2": ".קסעה יתבב תוקסעל תסחיתמ תיבירה - טידרק*",
"3": "",
"4": ""
}
]
]

Related

what will be the query for nested object filtration in sql for json field data

passing ID = 14385 in where condition and want return that object specific key from json document.
i want matched object key value like name: "Binod"
when ID matched with 14837 then return Sunil
jsonField value::
{
"nodeInfo":
{
"9":
{
"1": { "ID": "14835", "name": "Binod" },
"2": { "ID": "14836", "name": "Rahul" },
"3": { "ID": "14837", "name": "Sunil" },
},
"10":
{
"2": { "ID": "14838", "name": "Shikhar" },
"5": { "ID": "14839", "name": "Hari" },
"6": { "ID": "14840", "name": "Harsh" },
},
"7":
{
"cityData": {
"1": { "ID": "14855", "name": "Gannu" },
"2": { "ID": "14856", "name": "Singh" }
},
"townData": {
"5": { "ID": "14857", "name": "Bhusan" },
"7": { "ID": "14858", "name": "Ashwani" }
},
"areaData": {
"9": { "ID": "14861", "name": "Anjali" },
"1": { "ID": "14862", "name": "Pari Chauhan" }
},
}
}
}

How to create custom webhook in shopify

I need to create a custom webhook to send the order request. As like the response which I sending from other Woocommerce
Response below:
"params": {
"order_data": {
"id": 31502,
"referring_site": "",
"order_number": "31502",
"created_at": "2021-02-08 16:41:24",
"updated_at": "2021-02-08 16:41:24",
"completed_at": "",
"status": "pending",
"currency": "",
"total": "",
"subtotal": "",
"total_line_items_quantity": 1,
"total_tax": "0",
"total_shipping": "0",
"cart_tax": "0",
"shipping_tax": "0",
"total_discount": "0",
"shipping_methods": "Free shipping",
"order_key": "",
"payment_details": {
"method_id": "",
"method_title": "",
"paid_at": ""
},
"billing_address": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"formated_state": "",
"postcode": "",
"country": "",
"formated_country": "",
"email": "",
"phone": ""
},
"shipping_address": {
"first_name": "",
"last_name": "",
"company": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"formated_state": "",
"postcode": "",
"country": "",
"formated_country": ""
},
"note": "",
"customer_ip": "",
"customer_user_agent": "",
"customer_id": 29,
"view_order_url": "",
"line_items": [
{
"id": ,
"subtotal": "",
"subtotal_tax": "",
"total": "",
"total_tax": "",
"price": "",
"quantity": 1,
"name": "",
"product_id": 10072,
"variation_id": 0,
"product_url": "",
"product_thumbnail_url": "",
"sku": "",
"meta": ""
}
],
"shipping_lines": [
{
"id": ,
"method_id": "free_shipping",
"method_title": "Free shipping",
"total": "0"
}
],
"tax_lines": [],
"fee_lines": [],
"coupon_lines": []
}
}
Shopify has two available webhooks for you. The first is "orders/create" which is a webhook sending you the order when it is first created. The second is "orders/paid" which sends you the order once it has been marked as paid.
You therefore do not "create" your own order webhook, so much as you subscribe to or turn on, webhooks available in Shopify API.

How to get venues based on certain categories?

It is supposed to be
https://api.foursquare.com/v2/venues/search?ll=40.7484,-73.9857&categoryId=4d4b7105d754a06374d81259&radius=100&limit=5&client_id=X&client_secret=X&v=20200101
4d4b7105d754a06374d81259 is the categoryId for Food.
So, I expect to get a list of venues with that category.
But I am getting venues of every kind.
Sample-
{
"meta": {
"code": 200
"requestId": "5f0d9ac6a0a468438f4f1b11"
}
"notifications": [
{
"type": "notificationTray"
"item": {
"unreadCount": 0
}
}
]
"response": {
"venues": [
{
"id": "43695300f964a5208c291fe3"
"name": "Empire State Building"
"contact": {
"phone": "+12127363100"
"formattedPhone": "+1 212-736-3100"
"twitter": "empirestatebldg"
"instagram": "empirestatebldg"
"facebook": "153817204635459"
"facebookUsername": "empirestatebuilding"
"facebookName": "Empire State Building"
}
"location": {
"address": "350 5th Ave"
"crossStreet": "btwn 33rd & 34th St"
"lat": 40.7485995507123
"lng": -73.98580648682452
"distance": 23
"postalCode": "10118"
"cc": "US"
"neighborhood": "Midtown Manhattan, New York, NY"
"city": "New York"
"state": "NY"
"country": "United States"
"formattedAddress": [
"0": "350 5th Ave (btwn 33rd & 34th St)"
"1": "New York, NY 10118"
"2": "United States"
]
}
"categories": [
"0": {
"id": "4bf58dd8d48988d130941735"
"name": "Building" # SEE HERE, ITS A BUILDING
"pluralName": "Buildings"
"shortName": "Building"
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/building/default_"
"suffix": ".png"
}
"primary": true
}
]
"verified": true
"stats": {
"tipCount": 1165
"usersCount": 140228
"checkinsCount": 202739
}
"url": "https://www.esbnyc.com"
"venueRatingBlacklisted": true
"beenHere": {
"lastCheckinExpiredAt": 0
}
"venuePage": {
"id": "64514349"
}
"storeId": ""
"hereNow": {
"count": 0
"summary": "Nobody here"
"groups": [
]
}
"referralId": "v-1594727371"
"venueChains": [
]
"hasPerk": false
}
{
"id": "4bcca12bb6c49c7422169491"
"name": "86th Floor Observation Deck"
"contact": {
"phone": "+12127363100"
"formattedPhone": "+1 212-736-3100"
}
"location": {
"address": "350 5th Ave"
"crossStreet": "btwn 33rd & 34th Sts"
"lat": 40.74844544481811
"lng": -73.98568124187432
"labeledLatLngs": [
"0": {
"label": "display"
"lat": 40.74844544481811
"lng": -73.98568124187432
}
]
"distance": 5
"postalCode": "10118"
"cc": "US"
"city": "New York"
"state": "NY"
"country": "United States"
"formattedAddress": [
"0": "350 5th Ave (btwn 33rd & 34th Sts)"
"1": "New York, NY 10118"
"2": "United States"
]
}
"categories": [
"0": {
"id": "4bf58dd8d48988d165941735"
"name": "Scenic Lookout" # LOOK HERE, IT'S SCENIC LOOKOUT
"pluralName": "Scenic Lookouts"
"shortName": "Scenic Lookout"
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/parks_outdoors/sceniclookout_"
"suffix": ".png"
}
"primary": true
}
]
"verified": true
"stats": {
"tipCount": 241
"usersCount": 21820
"checkinsCount": 23730
}
"beenHere": {
"lastCheckinExpiredAt": 0
}
"venuePage": {
"id": "64514350"
}
"hereNow": {
"count": 0
"summary": "Nobody here"
"groups": [
]
}
"referralId": "v-1594727371"
"venueChains": [
]
"hasPerk": false
}
{
"id": "5af44f23bcbf7a002ce0a18a"
"name": "Workday"
"contact": {
}
"location": {
"address": "350 5th Ave"
"lat": 40.748333
"lng": -73.985577
"labeledLatLngs": [
"0": {
"label": "display"
"lat": 40.748333
"lng": -73.985577
}
]
"distance": 12
"postalCode": "10001"
"cc": "US"
"city": "New York"
"state": "NY"
"country": "United States"
"formattedAddress": [
"0": "350 5th Ave"
"1": "New York, NY 10001"
"2": "United States"
]
}
"categories": [
"0": {
"id": "4bf58dd8d48988d124941735"
"name": "Office" # IT'S AN OFFICE
"pluralName": "Offices"
"shortName": "Office"
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/building/default_"
"suffix": ".png"
}
"primary": true
}
]
"verified": false
"stats": {
"tipCount": 0
"usersCount": 12
"checkinsCount": 69
}
"venueRatingBlacklisted": true
"beenHere": {
"lastCheckinExpiredAt": 0
}
"hereNow": {
"count": 0
"summary": "Nobody here"
"groups": [
]
}
"referralId": "v-1594727371"
"venueChains": [
]
"hasPerk": false
}
{
"id": "5820b92252addb0cc786c053"
"name": "Expedia - New York City Office"
"contact": {
}
"location": {
"address": "350 5th Ave"
"lat": 40.748452
"lng": -73.985595
"labeledLatLngs": [
"0": {
"label": "display"
"lat": 40.748452
"lng": -73.985595
}
]
"distance": 10
"postalCode": "10118"
"cc": "US"
"city": "New York"
"state": "NY"
"country": "United States"
"formattedAddress": [
"0": "350 5th Ave"
"1": "New York, NY 10118"
"2": "United States"
]
}
"categories": [
"0": {
"id": "4bf58dd8d48988d124941735"
"name": "Office"
"pluralName": "Offices"
"shortName": "Office"
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/building/default_"
"suffix": ".png"
}
"primary": true
}
]
"verified": false
"stats": {
"tipCount": 0
"usersCount": 15
"checkinsCount": 52
}
"venueRatingBlacklisted": true
"beenHere": {
"lastCheckinExpiredAt": 0
}
"hereNow": {
"count": 0
"summary": "Nobody here"
"groups": [
]
}
"referralId": "v-1594727371"
"venueChains": [
]
"hasPerk": false
}
{
"id": "59a44ba0e97dfb37208faf41"
"name": "JCDecaux, NA"
"contact": {
}
"location": {
"address": "350 Fifth Avenue, 73rd floor"
"lat": 40.74847232935598
"lng": -73.98566846513467
"labeledLatLngs": [
"0": {
"label": "display"
"lat": 40.74847232935598
"lng": -73.98566846513467
}
]
"distance": 8
"postalCode": "10001"
"cc": "US"
"city": "New York"
"state": "NY"
"country": "United States"
"formattedAddress": [
"0": "350 Fifth Avenue, 73rd floor"
"1": "New York, NY 10001"
"2": "United States"
]
}
"categories": [
"0": {
"id": "4bf58dd8d48988d124941735"
"name": "Office"
"pluralName": "Offices"
"shortName": "Office"
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/building/default_"
"suffix": ".png"
}
"primary": true
}
]
"verified": false
"stats": {
"tipCount": 0
"usersCount": 21
"checkinsCount": 452
}
"venueRatingBlacklisted": true
"beenHere": {
"lastCheckinExpiredAt": 0
}
"hereNow": {
"count": 0
"summary": "Nobody here"
"groups": [
]
}
"referralId": "v-1594727371"
"venueChains": [
]
"hasPerk": false
}
]
"confident": false
}
}
So, what exactly am I doing wrong? What should be done to get only those venues in response which has their category as Food or some subcategory of it?
Your parameter is wrong. Replace categoryID with categoryId .
https://api.foursquare.com/v2/venues/search?ll=40.7484,-73.9857&categoryID=4d4b7105d754a06374d81259&radius=100&limit=5&client_id=X&client_secret=X&v=20200101 ->
https://api.foursquare.com/v2/venues/search?ll=40.7484,-73.9857&categoryId=4d4b7105d754a06374d81259&radius=100&limit=5&client_id=X&client_secret=X&v=20200101
2 things:
I read that the categoryId should come before anything else. I'm not sure if it's relevant, but it worked for me.
the radius was only 100m in your original url, I would suggest a bigger radius, as it maybe affected the result too.
For me this url worked perfectly:
https://api.foursquare.com/v2/venues/search?categoryId=4d4b7105d754a06374d81259&ll=40.7,-74&client_id=X&client_secret=X&v=20200101&radius=700&limit=20

How to map data in an array to another array output with different index in Mule Dataweave

I have an JSON like this:
{
"invoice-line": [
{
"id": "01",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "Mouse",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "2",
"item": "Keyboard",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "3",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
From this input JSON we need to extract the data and map into another output JSON but with a logic:
when line-num = 1 then map id, date, sales-date, description
then rest or the array will map id, item, descrption
Which will look like below:
{
"row": [
{
"id": "01",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
Also is that possible to perform something like mapping array item (first index) to different output array? For example:
{
"row": [
{
"id": "",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": ""
},
{
"id": "01",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Keyboard",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}
Hopefully this is what you were looking for:
%dw 1.0
%output application/json
---
row:
(payload.invoice-line filter ($.line-num == '1') map {
id: "",
date: $.date,
sales-date: $.sales-date,
line-num: $.line-num,
item: "",
descrption: ""
})
++
(payload.invoice-line map {
id: $.id,
date: "",
sales-date: "",
line-num: "",
item: $.item,
descrption: $.descrption
})
produces:
{
"row": [
{
"id": "",
"date": "2019-06-21",
"sales-date": "2019-06-21",
"line-num": "1",
"item": "",
"descrption": ""
},
{
"id": "01",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Mouse",
"descrption": "This is line 1 item"
},
{
"id": "02",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Keyboard",
"descrption": "This is line 2 item"
},
{
"id": "03",
"date": "",
"sales-date": "",
"line-num": "",
"item": "Monitor",
"descrption": "This is line 3 item"
}
]
}

How to use If command in the selenium ide?

I was searching the web for a long time. I'm trying to put if and else statements into this selenium IDE. The program itself doesn't provide any parameters, hints, or help. I saw a lot of results online where it's just java code, however I don't see anyway to enter code here.
Can someone show me an example of how to use this if and then statement?
Basic if condition example:
Example .side file. Save the below code in file with name as 'Test.side' and open in selenium ide
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://in.yahoo.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} != 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "bcc2bd2b-5091-4b40-b499-f89c38e532bf",
"comment": "",
"command": "sendKeys",
"target": "name=q",
"targets": [],
"value": "Hello world"
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}
If with else Example
Example .side file.
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} == 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "echo",
"target": "I am in Yahoo Page",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "else",
"target": "",
"targets": [],
"value": ""
}, {
"id": "a90e7c75-911a-46cb-ac52-a3fd394e6dfe",
"comment": "",
"command": "echo",
"target": "I am in already in google Page",
"targets": [],
"value": ""
}, {
"id": "2b29d6fe-a670-4349-be18-794e85fbd498",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "7f8ee438-4dae-4f34-b4b6-7a4a166acabf",
"comment": "",
"command": "sendKeys",
"target": "q=name",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}
If with ElseIf Example
Example selenium ide test file (.side)
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} == 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "echo",
"target": "I am in Yahoo Page",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "elseIf",
"target": "${title} != 'Yahoo'",
"targets": [],
"value": ""
}, {
"id": "a90e7c75-911a-46cb-ac52-a3fd394e6dfe",
"comment": "",
"command": "echo",
"target": "I am in google Page",
"targets": [],
"value": ""
}, {
"id": "2b29d6fe-a670-4349-be18-794e85fbd498",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "bcc2bd2b-5091-4b40-b499-f89c38e532bf",
"comment": "",
"command": "echo",
"target": "I am out side the if condition",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}